Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I am new to linux pls help me I have created a new user by editing /etc/passwd file gb :502:502:grodan brown user:/home/gb:bin/bash After saving this file I get a message ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! rah_jad's Avatar
    Join Date
    Sep 2008
    Posts
    14

    [SOLVED] How to create user by editing /etc/passwd file?


    I am new to linux pls help me

    I have created a new user by editing /etc/passwd file
    gb:502:502:grodan brown user:/home/gb:bin/bash
    After saving this file I get a message "would you like to edit /etc/shadow file"
    What is "shadow file" and why it is asking to edit it.
    What all steps needs to be done if creating a user through the /etc/passwd file.
    Last edited by Redman; 09-24-2008 at 09:45 PM. Reason: seems to be not solved after all

  2. #2
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11
    I am a new Linux user too, but someone point me to using

    "system-config-users", which comes with RH.

    At a command promtp type "system-config-users &", without the quotes.
    This brings up a GUI. Click on "New User", enter the users username and password, tell it where the user home dir is to be and click "OK". It does
    the rest.

  3. #3
    Just Joined! rah_jad's Avatar
    Join Date
    Sep 2008
    Posts
    14
    Thanx for the reply, but I want to do it from the passwd file.....

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11
    Why do it the hard way when RH give you a GUI that does it for you. Unless you really want to do it the manual way. In that case, go for it.

  6. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Use useradd to do this. Editing the passwd and shadow files by hand is not advised for a newbie.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #6
    Just Joined! rah_jad's Avatar
    Join Date
    Sep 2008
    Posts
    14
    Thanx for the reply, but I wants to know the steps to create user through passwd file

  8. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    What possible reason could you have for wanting to add a user other then the 2 recommended way listed above?
    You have been given both the CLI and the GUI way of doing it.
    They will populate the proper files with the proper information.
    No users mistakes.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  9. #8
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Quote Originally Posted by Lazydog View Post
    What possible reason could you have for wanting to add a user other then the 2 recommended way listed above?
    Probably because he wants to learn more about his system, which is an admirable goal in itself.

    Unfortunately I don't know the answer to the question, but I'm now intrigued enough that I'll be watching this thread to see if a good answer appears.


    EDIT: Here's some good info on the shadow file.
    Last edited by smolloy; 09-23-2008 at 05:07 PM. Reason: Extra info
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  10. #9
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Quote Originally Posted by smolloy View Post
    Probably because he wants to learn more about his system, which is an admirable goal in itself.
    And I would agree with this if the person had a more advance understanding of how the linux system worked. This is not a question a beginner would ask, and would be happy knowing how to add a user with as much ease as possible.

    His words, "I am new to linux pls help me".

    This being the internet you trust no one. This is the type of question a cracker would be asking because they cannot use the tools that are provided by the system or afraid to use the tools for being caught.

    I have no problem helping people but when you ask questions that are out there then I take the 'show them the correct way of doing it' and if that is not enough use caution. My red flag has been raised for this question.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  11. #10
    Just Joined! rah_jad's Avatar
    Join Date
    Sep 2008
    Posts
    14
    Hi All, It seems that everyone is suspecting because I have used the words "I am new to linux pls help me" and asking a complicated question (for me). I am reading RH302(edition5) and in CH-01 there is a practice question to create user by editing the /etc/passwd file. I tired it and able to create the user also, but when I logs in from that user it wont allow me to run any command an gives "permission denied".

Page 1 of 2 1 2 LastLast

Posting Permissions

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