Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Redhat / Fedora Linux Help > [SOLVED] How to create user by editing /etc/passwd file?
 Redhat / Fedora Linux Help   Help and discussion related to Redhat and Fedora Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 09-23-2008   #1 (permalink)
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
rah_jad is offline  

Old 09-23-2008   #2 (permalink)
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.
jhaxxar is offline  
Old 09-23-2008   #3 (permalink)
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.....
rah_jad is offline  
Old 09-23-2008   #4 (permalink)
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.
jhaxxar is offline  
Old 09-23-2008   #5 (permalink)
Linux Engineer
 
Lazydog's Avatar
 
Join Date: Jun 2004
Location: Pennsylvania
Posts: 912
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
Lazydog is offline  
Old 09-23-2008   #6 (permalink)
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
rah_jad is offline  
Old 09-23-2008   #7 (permalink)
Linux Engineer
 
Lazydog's Avatar
 
Join Date: Jun 2004
Location: Pennsylvania
Posts: 912
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
Lazydog is offline  
Old 09-23-2008   #8 (permalink)
Linux Guru
 
smolloy's Avatar
 
Join Date: Apr 2005
Location: CA, but from N.Ireland
Posts: 2,390
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.
__________________
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

Last edited by smolloy; 09-23-2008 at 05:07 PM.. Reason: Extra info
smolloy is offline  
Old 09-23-2008   #9 (permalink)
Linux Engineer
 
Lazydog's Avatar
 
Join Date: Jun 2004
Location: Pennsylvania
Posts: 912
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
Lazydog is offline  
Old 09-23-2008   #10 (permalink)
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".
rah_jad is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 11:11 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2