× Register Login What's New! Contact us
Results 1 to 14 of 14 visibility 2572

Help on LINUX!!

  1. #1
    jannat's Avatar Full Member
    brightness_1
    Full Member
    star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    May 2007
    Location
    mcr, UK;one day JANNAH Inshallah
    Gender
    Female
    Religion
    Islam
    Posts
    262
    Threads
    38
    Rep Power
    105
    Rep Ratio
    26
    Likes Ratio
    0

    Help on LINUX!!

    Report bad ads?



    i was wondering if any of u can use linux?l am resitting a module which requires me to make a manual using a sample test. the manual will help me for my real test inshallah . can anyone help me with the sample test...i.e with what commands i need to use ... i cant send it yet coz i cant upload it from photobucket - as there is maintainence at the site..will do ASAP


    JAZAKALLAH KHAIR ..




    chat Quote

  2. Report bad ads?
  3. #2
    jannat's Avatar Full Member
    brightness_1
    Full Member
    star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    May 2007
    Location
    mcr, UK;one day JANNAH Inshallah
    Gender
    Female
    Religion
    Islam
    Posts
    262
    Threads
    38
    Rep Power
    105
    Rep Ratio
    26
    Likes Ratio
    0

    Re: Help on LINUX!!


    iam just sending the site with the sample test .. Hope someone Can help inshallah.

    http://www.pcpki.com/osman/sampletest.pdf

    Jazakallah khair
    chat Quote

  4. #3
    alibaba's Avatar Full Member
    brightness_1
    Full Member
    star_rate
    Join Date
    Aug 2007
    Religion
    Unspecified
    Posts
    26
    Threads
    1
    Rep Power
    103
    Rep Ratio
    5
    Likes Ratio
    0

    Re: Help on LINUX!!

    I don't know anything about wild cats in North America
    chat Quote

  5. #4
    alibaba's Avatar Full Member
    brightness_1
    Full Member
    star_rate
    Join Date
    Aug 2007
    Religion
    Unspecified
    Posts
    26
    Threads
    1
    Rep Power
    103
    Rep Ratio
    5
    Likes Ratio
    0

    Re: Help on LINUX!!

    I saw one at a zoo once
    chat Quote

  6. Report bad ads?
  7. #5
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    Selam aleykum
    I'm a linux user, but my knowledge of it is fairly limited, but if there's anything I can help you with I'd be glad to do so inshaAllah. The problem is, I don't really get what the problem is where you need help with. Could you be more specific?

    Edit:
    Maybe this might help?

    Adding Users with useradd
    The most straightforward method for creating a new user from the shell is with the
    useradd command. After opening a Terminal window with root permission, you
    simply invoke useradd at the command prompt, with details of the new account as
    parameters.
    The only required parameter is the login name of the user, but you probably want
    to include some additional information ahead of it. Each item of account informa-
    tion is preceded by a single letter option code with a dash in front of it. Table 4-2
    lists the options available with useradd.
    Table 4-2
    useradd Command Options
    Option Description
    Provide a description of the new user account. Often the person’s
    -c comment
    full name. Replace comment with the name of the user account
    -c “comment here”
    (-c jake). Use quotes to enter multiple words (-c “jake
    jackson”).
    Set the home directory to use for the account. The default is to
    -d home_dir
    name it the same as the login name and to place it in /home.
    Replace home_dir with the directory name to use (for example,
    -d /mnt/homes/jake).
    Rather than create a new account, save the supplied information
    -D
    as the new default settings for any new accounts that are created.
    Assign the expiration date for the account in MM/DD/YYYY
    -e expire_date
    format. Replace expire_date with a date you want to use
    (-e 05/06/2005).
    Continued
    144 Part II ✦ Running the Show
    Table 4-2 (continued)
    Option Description
    Set the number of days after a password expires until the account
    -f -1
    is permanently disabled. The default, -1, disables the option.
    Setting this to 0 disables the account immediately after the
    password has expired. Replace -1 with the number to use.
    Set the primary group (as listed in the /etc/group file) the new
    -g group
    user will be in. Replace group with the group name (-g wheel).
    Add the new user to the supplied comma-separated list of
    -G grouplist
    groups (-G wheel,sales,tech,lunch).
    Set the skeleton directory containing initial configuration files and
    -k skel_dir
    login scripts that should be copied to a new user’s home
    directory. This parameter can be used only in conjunction with
    the -m option. Replace skel_dir with the directory name to
    use. (Without this option, the /etc/skel directory is used.)
    Automatically create the user’s home directory and copy the files
    -m
    in the skeleton directory (/etc/skel) to it.
    Do not create the new user’s home directory, even if the default
    -M
    behavior is set to create it.
    Turn off the default behavior of creating a new group that
    -n
    matches the name and user ID of the new user. This option is
    available with Red Hat Linux systems. Other Linux systems often
    assign a new user to the group named users instead.
    Use with -u uid to create a user account that has the same UID
    -o
    as another username. (This effectively lets you have two different
    usernames with authority over the same set of files and
    directories.)
    Enter a password for the account you are adding. This must be an
    -p passwd
    encrypted password. Instead of adding an encrypted password
    here, you can simply use the passwd user command later to
    add a password for user.
    Specify the command shell to use for this account. Replace
    -s shell
    shell with the command shell (-s bash).
    Specify the user ID number for the account (-u 474). Without the
    -u user_id
    -u option, the default behavior is to automatically assign the next
    available number. Replace user_id with the ID number (-u).
    For example, let’s create an account for a new user named Mary Smith with a login
    name of mary. First, log in as root, and then type the following command:
    # useradd -c “Mary Smith” mary
    145
    Chapter 4 ✦ Learning Basic Administration
    When you choose a username, don’t begin with a number (for example,
    Tip
    06jsmith). Also, it’s best to use all lowercase letters, no control characters or
    spaces, and a maximum of 8 characters. The useradd command allows up to 32
    characters, but some applications can’t deal with usernames that long. Tools such
    as ps display UIDs instead of names if names are too long. Having users named
    Jsmith and jsmith can cause confusion with programs (such as sendmail) that
    don’t distinguish case.
    Next, set Mary’s initial password using the passwd command. You’re prompted to
    type the password twice:
    # passwd mary
    Changing password for user mary.
    New password: *******
    Retype new password: *******
    (Asterisks in this example represent the password you type. Nothing is actually dis-
    played when you type the password.)
    In creating the account for Mary, the useradd command performs several actions:
    ✦ Reads the /etc/login.defs file to get default values to use when creating
    accounts.
    ✦ Checks command-line parameters to find out which default values to override.
    ✦ Creates a new user entry in the /etc/passwd and /etc/shadow files based on
    the default values and command-line parameters.
    ✦ Creates any new group entries in the /etc/group file. (Red Hat creates a
    group using the new user’s name; Gentoo adds the user to the users group;
    and SUSE adds it to every group you set for new users, such as dialout, audio,
    video, and other services.)
    ✦ Creates a home directory, based on the user’s name, in the /home directory.
    ✦ Copies any files located within the /etc/skel directory to the new home
    directory. This usually includes login and application startup scripts.
    The preceding example uses only a few of the available useradd options. Most
    account settings are assigned using default values. You can set more values explic-
    itly, if you want to; here’s an example that uses a few more options to do so:
    # useradd -g users -G wheel,sales -s /bin/tcsh -c “Mary Smith” mary
    In this case, useradd is told to make users the primary group mary belongs to
    (-g), add her to the wheel and sales groups, and assign tcsh as her primary com-
    mand shell (-s). A home directory in /home under the user’s name (/home/mary) is
    created by default. This command line results in a line similar to the following being
    added to the /etc/passwd file:
    mary:x:502:100:Mary Smith:/home/mary:/bin/tcsh
    146 Part II ✦ Running the Show
    Each line in the /etc/passwd file represents a single user account record. Each
    field is separated from the next by a colon ( character. The field’s position in the
    sequence determines what it is. As you can see, the login name is first. Again, the
    password field contains an x because we are using a shadow password file to store
    encrypted password data. The user ID selected by useradd is 502. The primary
    group ID is 100, which corresponds to the users group in the /etc/group file. The
    comment field was correctly set to Mary Smith, the home directory was automati-
    cally assigned as /home/mary, and the command shell was assigned as /bin/tcsh,
    exactly as specified with the useradd options.
    By leaving out many of the options (as I did in the first useradd example), defaults
    are assigned in most cases. For example, by not using -g users or -G
    wheel,sales, in Red Hat Linux a group named mary would have been created and
    assigned to the new user. Other Linux systems assign users as the group name by
    default. Likewise, excluding -s /bin/tcsh causes /bin/bash to be assigned as the
    default shell.
    The /etc/group file holds information about the different groups on your Linux
    system and the users who belong to them. Groups are useful for enabling multiple
    users to share access to the same files while denying access to others. Peek at the
    /etc/group file, and you find something similar to this:
    bin:x:1:root,bin,daemon
    daemon:x:2:root,bin,daemon
    sys:x:3:root,bin,adm
    adm:x:4:root,adm,daemon
    tty:x:5:
    disk:x:6:root
    lp:x:7:daemon,lp
    mem:x:8:
    kmem:x:9:
    wheel:x:10:root,joe,mary
    .
    .
    .
    nobody:x:99:
    users:x:100:
    chris:x:500
    sheree:x:501
    sales:x:601:bob,jane,joe,mary
    Each line in the group file contains the name of a group, the group ID number asso-
    ciated with it, and a list of users in that group. By default, each user is added to his
    or her own group, beginning with GID 500. Note that mary was added to the wheel
    and sales groups instead of having her own group.
    It is actually rather significant that mary was added to the wheel group. By doing
    this, you grant her the capability to use the sudo command to run commands as
    the root user (provided that sudo is configured as described later in this chapter).
    147
    Chapter 4 ✦ Learning Basic Administration
    Setting User Defaults
    The useradd command determines the default values for new accounts by reading
    the /etc/login.defs file. You can modify those defaults by either editing that file
    manually with a standard text editor or by running the useradd command with the
    -D option. Although login.defs is different on different Linux systems, here is an
    example containing many of the settings you might find in a login.defs file:
    PASS_MAX_DAYS 99999
    PASS_MIN_DAYS 0
    PASS_MIN_LEN 5
    PASS_WARN_AGE 7
    UID_MIN 500
    UID_MAX 60000
    GID_MIN 500
    GID_MAX 60000
    CREATE_HOME yes
    All uncommented lines contain keyword/value pairs. For example, the keyword
    PASS_MIN_LEN is followed by some white space and the value 5. This tells useradd
    that the user password must be at least five characters. Other lines let you cus-
    tomize the valid range of automatically assigned user ID numbers or group ID num-
    bers. (Red Hat starts at UID 500; other Linuxes start with UID 100.) A comment
    section that explains that keyword’s purpose precedes each keyword (which I
    edited out here to save space). Altering a default value is as simple as editing the
    value associated with a keyword and then saving the file.
    If you want to view the defaults, type the useradd command with the -D option, as
    follows:
    # useradd -D
    GROUP=100
    HOME=/home
    INACTIVE=-1
    EXPIRE=
    SHELL=/bin/bash
    SKEL=/etc/skel
    You can also use the -D option to change defaults. When run with this flag, useradd
    refrains from actually creating a new user account; instead, it saves any additionally
    supplied options as the new default values in /etc/login.defs. Not all useradd
    options can be used in conjunction with the -D option. You can use only the five
    options listed in Table 4-3.
    148 Part II ✦ Running the Show
    Table 4-3
    useradd Options for Changing User Defaults
    Options Description
    Set the default directory in which user home directories
    -b default_home
    are created. Replace default_home with the directory
    name to use (-b garage). Usually this is /home.
    Set the default expiration date on which the user account
    -e default_expire_date
    is disabled. The default_expire_date value should
    be replaced with a date in the form MM/DD/YYYY
    (-e 10/15/2007).
    Set the number of days after a password has expired
    -f default_inactive
    before the account is disabled. Replace default_
    inactive with a number representing the number of
    days (-f 7).
    Set the default group that new users will be placed in.
    -g default_group
    Normally useradd creates a new group with the same
    name and ID number as the user. Replace default_
    group with the group name to use (-g bears).
    Set the default shell for new users. Normally this is
    -s default_shell
    /bin/bash. Replace default_shell with the full
    path to the shell that you want as the default for new
    users (-s /bin/ash).
    To set any of the defaults, give the -D option first, and then add the defaults you
    want to set. For example, to set the default home directory location to
    /home/everyone and the default shell to /bin/tcsh, type the following:
    # useradd -D -b /home/everyone -s /bin/tcsh
    Besides setting up user defaults, an administrator can create default files that are
    copied to each user’s home directory for use. These files can include login scripts
    and shell configuration files (such as .bashrc).
    Other commands exist that are useful for working with user accounts, including
    usermod (to modify settings for an existing account) and userdel (to delete an
    existing user account).
    Suorce: linux bible 2006


    Oh as for setting up aliases
    Each user has his a file that the shell loads on startup. To give an example, on my pc there exist a file /home/steve/.bashrc (the dot before the name indicates it's a hidden file, so it won't turn up if you use the "ls" command). That means if the user Steve loads the bash, that specific file will dictate how the bash works. If you open that file with a text editor (for example you could type "vi .bashrc" in the command line if you have the vi-texteditor installed) all you have to do is add a simple line in the document saying:
    alias dir='ls'
    then when you reload the bash and you type in "dir", the bash will interpret that as if you have typed "ls"

    As for setting up permission, you need chmod for that one:
    The following steps lead you through creating directories within your home direc-
    tory and moving among your directories, with a mention of setting appropriate file
    permissions:
    1. Go to your home directory. To do this, simply type cd. (For other ways of
    referring to your home directory, see the “Identifying Directories” sidebar.)
    2. To make sure that you got to your home directory, type pwd. When I do this, I
    get the following response (yours will reflect your home directory):
    $ pwd
    /home/chris
    3. Create a new directory called test in your home directory, as follows:
    $ mkdir test
    4. Check the permissions of the directory:
    $ ls -ld test
    drwxr-xr-x 2 chris sales 1024 Jan 24 12:17 test
    This listing shows that test is a directory (d). The d is followed by the per-
    missions (rwxr-xr-x), which are explained later in the “Understanding File
    Permissions” section. The rest of the information indicates the owner
    (chris), the group (sales), and the date that the files in the directory were
    most recently modified (Jan. 24 at 12:17 p.m.).
    Note In some Linux systems, such as Fedora Core, when you add a new user, the user is
    assigned to a group of the same name by default. For example, in the preceding
    text, the user chris would be assigned to the group chris. This approach to
    assigning groups is referred to as the user private group scheme. For more infor-
    mation on user private groups, see Chapter 4.
    For now, type the following:
    $ chmod 700 test
    This step changes the permissions of the directory to give you complete
    access and everyone else no access at all. (The new permissions should read
    as follows: rwx------.)
    5. Make the test directory your current directory as follows:
    $ cd test
    Source: linux bible 2006


    Hope this helps inshaAllah
    Last edited by Abdul Fattah; 08-29-2007 at 07:53 PM.
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  8. #6
    jannat's Avatar Full Member
    brightness_1
    Full Member
    star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    May 2007
    Location
    mcr, UK;one day JANNAH Inshallah
    Gender
    Female
    Religion
    Islam
    Posts
    262
    Threads
    38
    Rep Power
    105
    Rep Ratio
    26
    Likes Ratio
    0

    Re: Help on LINUX!!



    first of all jazakallah khair for ur input, much appreciated, i not much of a linux user and to be honest find it difficult. i studied it in january and now resitting the module. i need to be able to answer the questions 1, 2 , 3 .. at the moment i am planning to focus on the first question, as it has the most marks..inshallah if i do well in that question then inshallah i will be able to pass..
    Basically in the first question we need to learn to manage users/groups...and will be test on how well users are managed etc.. i need to try out commands such as useradd etc... when i understand how to use the commands i will create a manual which will help me apply the relevant commands in the real test..i can hand my manual till monday inshallah as i asked my lecturer today,
    at the moment i have not studied this sample test.. i know little bits.. is it possible you can help tomorrow as i will be beta prepared inshallah and will ask on the specific commands i find difficult
    thanks
    chat Quote

  9. #7
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    Oh, ok I get it now, the pdf is an example of an exam that they might give you.

    Ok let me see if I can answer the sample text in detail.
    (that might take soem time though, I'll get back to you as soon as possible inshaAllah)
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  10. #8
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    Oh, here's some more infor on file permissions:

    Understanding File Permissions
    After you’ve worked with Linux for a while, you are almost sure to get a
    Permission denied message. Permissions associated with files and directories in
    Linux were designed to keep users from accessing other users’ private files and to
    protect important system files.
    The nine bits assigned to each file for permissions define the access that you and
    others have to your file. Permission bits appear as rwxrwxrwx. The first three bits
    apply to the owner’s permission, the next three apply to the group assigned to the
    file, and the last three apply to all others. The r stands for read, the w stands for
    write, and the x stands for execute permissions. If a dash appears instead of the let-
    ter, it means that permission is turned off for that associated read, write, or execute.
    Because files and directories are different types of elements, read, write, and exe-
    cute permissions on files and directories mean different things. Table 2-10 explains
    what you can do with each of them:
    68 Part I ✦ Linux First Steps
    Table 2-10
    Setting Read, Write, and Execute Permissions
    Permission File Directory
    Read View what’s in the file. See what files and subdirectories it contains.
    Write Change the file’s content, Add files or subdirectories to the directory.
    rename it, or delete it.
    Execute Run the file as a program. Change to that directory as the current
    directory, search through the directory, or
    execute a program from the directory.
    You can see the permission for any file or directory by typing the ls -ld command.
    The named file or directory appears as those shown in this example:
    $ ls -ld ch3 test
    -rw-rw-r-- 1 chris sales 4983 Jan 18 22:13 ch3
    drwxr-xr-x 2 chris sales 1024 Jan 24 13:47 test
    The first line shows that the ch3 file has read and write permission for the owner
    and the group. All other users have read permission, which means they can view
    the file but cannot change its contents or remove it. The second line shows the
    test directory (indicated by the letter d before the permission bits). The owner
    has read, write, and execute permission, while the group and other users have only
    read and execute permissions. As a result, the owner can add, change, or delete
    files in that directory, and everyone else can only read the contents, change to that
    directory, and list the contents of the directory.
    If you own a file, you can use the chmod command to change the permission on it as
    you please. In one method of doing this, each permission (read, write, and execute),
    is assigned a number — r=4, w=2, and x=1 — and you use each set’s total number to
    establish the permission. For example, to make permissions wide open for yourself
    as owner, you’d set the first number to 7 (4+2+1), and to give the group and others
    only read permission, you’d both the second and third numbers to 4 (4+0+0), so
    that the final number is 744. Any combination of permissions can result from 0 (no
    permission) through 7 (full permission).
    Here are some examples of how to change permission on a file (named file) and
    what the resulting permission would be:
    chmod 777 file
    # rwxrwxrwx
    chmod 755 file
    # rwxr-xr-x
    chmod 644 file
    # rw-r--r-
    chmod 000 file
    # ---------
    69
    Chapter 2 ✦ Running Commands from the Shell
    You can also turn file permissions on and off using plus (+) and minus (–) signs,
    respectively. This can be done for the owner user (u), owner group (g), others (o),
    and all users (a). For example, start with a file that has all permissions open (rwxr-
    wxrwx). Run the following chmod commands using minus sign options. The result-
    ing permissions are shown to the right of each command:
    chmod a-w file r-xr-xr-x
    chmod o-x file rwsrwsrw-
    chmod go-rwx file rwx------
    Likewise, here are some examples, starting with all permissions closed (---------)
    where the plus sign is used with chmod to turn permissions on:
    chmod u+rw files rw-------
    chmod a+x files --x--x--x
    chmod ug+rx files r-xr-x---
    When you create a file, it’s given the permission rw-r--r-- by default. A directory is
    given the permission rwxr-xr-x. These default values are determined by the value of
    umask. Type umask to see what your umask value is. For example:
    $ umask
    022
    The umask value masks the permissions value of 666 for a file and 777 for a direc-
    tory. The umask value of 022 results in permission for a directory of 755 (rwxr-xr-x).
    That same umask results in a file permission of 644 (rw-r--r--). (Execute permissions
    are off by default for regular files.)
    Time saver: use the -R options of chmod, to change the permission for all of the
    Tip
    files and directories within a directory structure at once. For example, if you
    wanted to open permissions completely to all files and directories in the
    /tmp/test directory, you could type the following:
    $ chmod -R 777 /tmp/test
    This command line runs chmod recursively (-R) for the /tmp/test directory, as
    well as any files or directories that exist below that point in the file system (for
    example, /tmp/test/hat, /tmp/test/hat/caps, and so on). All would be set
    to 777 (full read/write/execute permissions). This is not something you would do
    on an important directory on a read/write file system. However, you might do this
    before you create a directory structure on a CD-ROM that you want to be fully
    readable and executable to someone using the CD-ROM later.
    Caution The -R option of chmod works best if you are opening permissions completely or
    adding execute permission (as well as the appropriate read/write permission).
    The reason is that if you turn off execute permission recursively, you close off your
    capability to change to any directory in that structure. For example, chmod -R 644
    /tmp/test turns off execute permission for the /tmp/test directory, and then
    fails to change any files or directories below that point.
    again my source is: linux bible 2006
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  11. #9
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    Part 1 – User management [this part is worth 50% of the marks for the test]
    You have been asked to configure a computer system for a small company. The details are as
    follows:
    There are ten users, called Robert, Michael, Luke, Laura, Emily, Jimmy, Louise, Felix, Oscar,
    Tiffany.
    There are three project teams:
    • “Red” – Robert, Michael, Laura, Tiffany, Oscar
    • “Blue” – Jimmy, Louise, Emily, Felix, Michael
    • “Green” – Oscar, Felix, Luke, Emily, Robert
    Each project team needs a shared directory accessible only by the project members.
    Each user needs:
    • an initial password;
    • some aliases to allow the user to use more readable command line commands (for
    example using “dir”, “type”, “rename” and “delete” instead of their unfriendly
    Linux equivalents “ls”, “cat”, “mv” and “rm”).
    • a list of “logged on users” displayed when the user logs on.
    Create a “/download” directory, where:
    • any user who is a member of the “red” project can retrieve a file if they know it’s
    name, but cannot use “ls” to find out the name of a file;
    • users who are not members of the “red” project have no access to the directory;
    • only Michael can add or delete files to the directory, or list its contents.


    Obviously you will have to work from your bash. How to open a bash (or shell, or terminal) depends on your system. But I'm hoping you know how. Oh I might mention steps that are obvious, but I think you rather have me giving to much information as opposed to to little, right? I also hope you realise that sample test means you might get completely different questions on your actual test! (that is also mentioned in the pdf b.t.w.) the part in code boxes is all the text in your bash, the part in red is the text that you have to type. Oh and a last tip. when you are stuck, there's two options that might help you (and the pdf says they are allowed).
    For examlpe if you're stuck on how to use useradd type:
    Code:
    $man useradd
    This will give you a detailed manual. You can get back to your bash simply by typing "q". Alternatively you can type:
    Code:
    $useradd --help
    This will give you a brief description on how to use it. You remain in your bash and don't need to exit.

    Ok lets start over from the beginning. I made to many mistakes in the first method. So in order to get rid of some of the confusion let me type out a third method that is a combination of your friends method and mine. Note again that this is again not necesairly the best and perfect way. But inshaAllah, this tyme it will atleast work

    So start with
    Code:
    $sudo su
    password:******
    #
    Note that the prompt has changed from "$" to "#". That indicates you now have root access. However, not all linux-systems allow you to load a root-bash as regular user. If that is the case, you will have to login as root from the start. Anyway, now that we have root access we can start. The logical thing seems to me to first create the required groups. Type in:
    Code:
    #groupadd redteam
    #groupadd blueteam
    #groupadd greenteam
    Note that this time I used the name "redteam" instead of just "red" to avoid confusion between the directory, and the teamname.

    Now one last step of preparation we are going to do. When creating users with useradd, it Copies any files located within the /etc/skel directory to the new home directory. This usually includes login and application startup scripts. Now part of the assignment was to make aliases for accessibility. these aliases have to be made in the startupscripts. So instead of doing that 10 times for all ten users, we are going to do that only once in the /etc/skel directory. The useraddfunction will then use our altered startupscript, and copy that one ten times, thus saving us a whole bunch of work. Now I don't know which text editor you are used to use from the shell (emachs, vi, nano) or did they teach you to use GUI-applications like gedit? Gedit is easiest to use, but you might run into problems with permissions when your are not logged in as root. therefor I normally use vi. So open the file we want to edit with your text editor of choice:
    Code:
    #vi /etc/skel/.bashrc
    or:
    Code:
    #gedit /etc/skel/.bashrc
    or:
    Code:
    #emachs /etc/skel/.bashrc
    or:
    Code:
    #nano /etc/skel/.bashrc
    Now I will explain the method with vi only. The terminal has changed and brought you into that file. You will see something like:
    Code:
    # ~/.bashrc: executed by bash(1) for non-login shells.
    # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
    # for examples
    
    # If not running interactively, don't do anything
    [ -z "$PS1" ] && return
    ...
    ...
    ...
    Use the down-arrow on your keyboard to navigate all the way down. Near the end you will see the following lines:
    Code:
    # some more ls aliases
    #alias ll='ls -l'
    #alias la='ls -A'
    #alias l='ls -CF'
    Although this isn't really necessary, it would be a courtesy to the users to add your aliases right under those. So navigate your cursor to the empty line directly under it with your keyboard-arrows. Vi has two modes; navigation mode that allows you to navigate the text with your cursor and insertion mode that allows you to add text. So once you navigated to the preferred spot press "i" to start insertion mode and type the following lines:
    Code:
    alias dir='ls'
    alias type='cat'
    alias rename='mv'
    alias delete='rm' 
    Important note on using vi. During insertion mode you cannot use the navigation arrows or the backspace. If you make a typo, go back to navigation mode by pressing the esc button. Then navigate your cursor over the typo and press x to delete it, then navigate back to where you got. Press "i" again and continue typing. If you messed up and deleted something you shouldn't have, here's a way to solve that. First go to navigation mode by pressing esc. Then press colon ":" to go to options. You are now at the bottom of the window. Now type q! (force quit). Force quit allows you to exit without saving. Now you are back in the terminal and can load the text just like you did before and start over. When you are done with writing press esc. Then colon again, but this time write wq (write-quit) to first save your progress and then quit the editor.

    Setting a new user:
    Code:
    #useradd -g redteam -G greenteam -c "Robert" robert
    And setting his password:
    Code:
    #passwd robert
    Changing password for user robert.
    New password:*******
    Retype new password:*******
    Do this for all users:
    Code:
    #useradd -G redteam,blueteam -c "Michael" michael
    Don't forget their paswords:
    Code:
    #passwd michael
    Changing password for user michael.
    New password:*******
    Retype new password:*******
    (Note that if you set their paswords to their names that all users will hence know all other user's pasword. Since robert is notified that his initial pasword is "robert" He'll be smart enough to figure out that micheal's pasword will be "michael". So that means that the initial days, before people change their paswords it will be very easy to breach security.

    Making directories:
    Code:
    #mkdir /home/red
    mkdir /home/blue
    mkdir /home/green 
    mkdir /home/download
    Note that the reason I put these directories in teh home folder is because it will be iesier for users to navigate to them, and because the home folder is usually the biggest partition.But you can also set it to /red instead of /home/red

    Now changing ownership:
    Code:
    #chown :redteam /home/red
    chown :blueteam /home/blue
    chown :greenteam /home/green
    This changes the group of directory /home/red to the "redteam"

    Now we still have the download directory.
    Code:
    #chown :redteam /home/download
    This sets the groupowner to "redteam"
    then without the colon we will set the personal owner.
    Code:
    #chown michael /home/download
    Now we want to change permission Type in:
    Code:
    #chmod 070 /home/red
    chmod 070 /home/blue
    chmod 070 /home/green
    chmod 710 /home/download
    I still don't know how to do the list of logged in users. I know that in order to see the logged in users, you simply type in: "users" in your terminal, but I don't know how to set that automatically on log-in.













    --x = permission one
    -w- = permission two
    -wx = permission three
    r-- = permission four
    r-x = permission five
    rw- = permission six
    rwx = permission seven
    where x=execute; w=write and r=read

    source: http://www.linuxhomenetworking.com/w...Users_and_Sudo
    Last edited by Abdul Fattah; 09-04-2007 at 05:17 PM.
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  12. Report bad ads?
  13. #10
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    format_quote Originally Posted by alibaba View Post
    I don't know anything about wild cats in North America
    Actually those aren't called linux but lynx.
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  14. #11
    jannat's Avatar Full Member
    brightness_1
    Full Member
    star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    May 2007
    Location
    mcr, UK;one day JANNAH Inshallah
    Gender
    Female
    Religion
    Islam
    Posts
    262
    Threads
    38
    Rep Power
    105
    Rep Ratio
    26
    Likes Ratio
    0

    Re: Help on LINUX!!



    thanks for ur help... one of my friends has helped me and she has came up with some different commands, hope u can explain the problems .. for example:

    the group adding is the same however how do u know that ROBERT is the owner of the directory? did u mean micheal...
    when u made the download directory can u just do mkdir /download....?
    when we made teh directory we changed the ownership to Micheal i.e. chown micheal.red /download then we did chmod 2710 /download..have u heard of STICKY BITS well am not sure what they actually do but the 2 in the permission 2710 is the sticky bit ..could u explain the importance..

    then when we logged in as micheal we did UMASK...002 , why do even use it ? wats the point ...

    i have editted th file /etc/skel/.bashrc for the ALIAS how do u run them to see if they work for each user...
    ..
    trying to work out the login .. i fink it works ...
    hope its nt too many questions...
    jzk

    chat Quote

  15. #12
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    format_quote Originally Posted by jannat View Post


    thanks for ur help... one of my friends has helped me and she has came up with some different commands, hope u can explain the problems .. for example:

    the group adding is the same however how do u know that ROBERT is the owner of the directory?
    I think if you make the directory in /home/robert, then robert will automatically be the owner since it's ion his home directory. I just figured that way was easier. But changing ownership would work to. Oh yeah seems I swapped robert for Michael, somehow I thought he was the one who should have permission 7. Geuss taht was because it was past my bedtime.

    when we made teh directory we changed the ownership to Micheal i.e. chown micheal.red /download then we did chmod 2710 /download..have u heard of STICKY BITS well am not sure what they actually do but the 2 in the permission 2710 is the sticky bit ..could u explain the importance..
    I don't know what sticky bits are, but I looked it up here:
    http://en.wikipedia.org/wiki/Sticky_bit
    I don't think the assignment requires this.
    As for the permission number "1", it is definitely wrong. in your example permission 1 is appointed to the group. Execute-only is permission 1. Read-only is permission 4. They are not supposed to have execute permission (if they have then they can do ls) they were only supposed to have read permission (to read the files if they knew the name).

    then when we logged in as micheal we did UMASK...002 , why do even use it ? wats the point ...
    Oh yeah, I hadn't thought of that, but that's actually smart.
    The umask utility shall set the file mode creation mask of the current shell execution environment (see Shell Execution Environment ) to the value specified by the mask operand. This mask shall affect the initial value of the file permission bits of subsequently created files.
    http://www.opengroup.org/onlinepubs/...ies/umask.html

    i have editted th file /etc/skel/.bashrc for the ALIAS how do u run them to see if they work for each user...
    Well you don't actually have to run them. Let's say you want to check Tiffany's you could just type:
    Code:
    #cat /home/tiffany/.bashrc 
    
    # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything [ -z "$PS1" ] && return ... ... ...
    Cat (catagonise) will display the whole file in your bash and you can check if the aliases are there. Alternatively you could type:
    Code:
    #su tiffany
    password: *****
    $
    That logs you in as tiffany so I think that should load tiffany's bash to. Oh the password that you are prompted for is of course Tiffany's password, and not your root password. Also note you then no longer have root privileges until you do the "sudo su" again.

    ..
    trying to work out the login .. i fink it works ...
    hope its nt too many questions...
    jzk

    That's ok, it was a nice opportunity for me to learn a bit more about linux. Been using it amateuristicly for half a year now. But I still feel like a noob because I don't bother reading up on it any more.

    Oh, I'm curious, did your friend also use the 3 ghost accounts or did she use an alternative method for that?
    Last edited by Abdul Fattah; 09-01-2007 at 11:55 PM.
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  16. #13
    Abdul Fattah's Avatar Full Member
    brightness_1
    a.k.a. steve
    star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    Apr 2005
    Location
    Belgium, Gent
    Gender
    Male
    Religion
    Islam
    Posts
    1,931
    Threads
    36
    Rep Power
    124
    Rep Ratio
    68
    Likes Ratio
    4

    Re: Help on LINUX!!

    It's due tomorrow right? If you still have urgent questions pm me, (I might not check this tread al the time)
    Help on LINUX!!

    Check out my website for my conversion story.
    Check out my free e-book if you like reading drama-novels.
    chat Quote

  17. #14
    jannat's Avatar Full Member
    brightness_1
    Full Member
    star_rate star_rate star_rate star_rate star_rate star_rate
    Join Date
    May 2007
    Location
    mcr, UK;one day JANNAH Inshallah
    Gender
    Female
    Religion
    Islam
    Posts
    262
    Threads
    38
    Rep Power
    105
    Rep Ratio
    26
    Likes Ratio
    0

    Re: Help on LINUX!!

    salam i am trying out ur commands , saying to the bit of the permission and keep gettin a problem with the chmod commands
    i.e. chmod 070 /home/red
    chmod 070 /home/blue
    chmod 070 /home/green

    the computer keeps saying that there is no such DIRECTORY....
    /home/red
    /home/blue
    /home /green

    Please help if u can!!!!! we didnt test the directories.. dont know if we were rite...
    chat Quote


  18. Hide
Hey there! Help on LINUX!! Looks like you're enjoying the discussion, but you're not signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off. You also get notifications, here and via email, whenever new posts are made. And you can like posts and share your thoughts. Help on LINUX!!
Sign Up

Similar Threads

  1. Ubuntu / Linux users?
    By Mohamed_ in forum General
    Replies: 21
    Last Post: 10-21-2009, 02:43 PM
  2. How many of you use linux?
    By zakirs in forum General
    Replies: 29
    Last Post: 08-31-2009, 05:52 PM
  3. what OS do you use? Windows, Linux, Mac, BSD??
    By straightpath in forum Feedback & Suggestions
    Replies: 3
    Last Post: 02-28-2007, 11:45 PM
  4. what OS do you use? Windows, Linux, Mac, BSD??
    By straightpath in forum General
    Replies: 3
    Last Post: 02-28-2007, 11:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
create