Creating a new user with the Command Line (Linux)
Results 1 to 8 of 8

Thread: Creating a new user with the Command Line (Linux)

  1. #1
    Member
    Join Date
    Jun 2002
    Posts
    95

    Creating a new user with the Command Line (Linux)

    Hiya All,

    Just a quick tutorials on how to create a new user account for the command line in Linux.

    -> open the terminal
    -> su for root access
    -> type 'adduser [account name]' (without quotes)
    -> type passwd [account name] (again without quotes)
    -> type in your password twice when it prompts you.

  2. #2
    It's a gas!
    Join Date
    Jul 2002
    Posts
    699
    Thats a very short and very basic tutorial and ive only started learning Linux, but i cant talk, i havent done a tut yet!

    r3b00+

  3. #3
    Member
    Join Date
    Jun 2002
    Posts
    95
    ill try and expand on it if i can , neway the shorter the easier to understand

  4. #4
    Senior Member roswell1329's Avatar
    Join Date
    Jan 2002
    Posts
    670
    unixjim -- Maybe you could include how to add a user to the system without using 'adduser' or 'useradd'? You could explain what each field in the passwd file means, and how to enter those things manually. You could talk about the skel files and where they come from, and you could talk about the group file, and how to edit that manually. Just some suggestions.
    /* You are not expected to understand this. */

  5. #5
    Member
    Join Date
    Sep 2002
    Posts
    98

    god!!!

    too short to be called a tutorial !!!!
    lets add somthing to it
    ---------------------------------------------------------------------------------------------------------------
    User data and group information are traditionally stored in two files: /etc/passwd and /etc/group . The /etc/passwd file stores usernames, encrypted passwords, real names, and other user information. The /etc/group file stores group information and lists the groups of which the user is a member.


    There are several methods you can use to add a user. The first, and probably the most difficult, is to make an entry in the /etc/passwd file (and /etc/group , if necessary) for the new user. The passwd entry looks something like this:


    markk:0QLp0ZyXo.shE:500:500:Mark F. Komarinski:/home/markk:/bin/tcsh




    To enter a new user, simply add your own line. Replace the entire encrypted field with an asterisk ( * ) or some other character. Be sure the UID is unique. Now, create the home directory for the user you entered, copy files from /etc/skel to the home directory, and chown all the files in the home directory to the new user. Once the user exists, give the user a password by using the command as root:


    passwd markk


    Assuming that markk is the UID you created, this will put a valid encrypted password in the passwd field, and the user can now log in. The first thing the new user should do is change his password.





  6. #6
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953
    What form of encryption does nix use for the passwd's?
    Is it diff for each port?

    much_props::black_death&unixjim
    yeah, I\'m gonna need that by friday...

  7. #7
    Senior Member roswell1329's Avatar
    Join Date
    Jan 2002
    Posts
    670
    Originally posted here by tampabay420
    What form of encryption does nix use for the passwd's?
    Is it diff for each port?

    much_props::black_death&unixjim
    Yup. In fact, each port generally will allow you to change the encryption level you want to use. Options that usually exist are:

    Standard DES
    Multiple iteration DES
    MD5

    Most Linux/BSD distros will also let you use a shadow file.

    shadow file n. -- A file located at /etc/shadow within several Linux/BSD distributions that contains the actual encrypted passwords for each user from the passwd file. The encrypted password in the passwd file (2nd entry on each line) is replaced with a single 'x' when a shadow file is being used. This is very helpful as the passwd file should be readable by everyone (only the password should be kept private). The shadow file then contains an entry for each user in the password file that consists of username:encrypted_password. Shadow files are usually kept at the highest permission level.
    /* You are not expected to understand this. */

  8. #8
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953
    roswell1329::cool/thanx
    yeah, I\'m gonna need that by friday...

Posting Permissions

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