Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding users in Redhat 7.3

Status
Not open for further replies.

vfear

Technical User
Feb 9, 2001
159
US
I am running redhat 7.3 and I am trying ot add users through the shell . can you tell me the exact command I tried #useradd New_user and adduser newuser but neither work can someone please help
 
The command should be "useradd". If you enter the command at the shell prompt with no command-line parameters, it should issue a help screen. ______________________________________________________________________
TANSTAAFL!
 
sleipnir214, I have to ask; what does TANSTAAFL! mean?
 
If you ask me, I'd rather just edit the passwd file directly and then just update the shadow files using pwconv.

It's faster, easier and more efficient.

Regards.

There are many ways of doing things, select your way.
 
You think that doing something like this....

vipw
chris:somepass:522:522::/home/chris:/bin/bash
pwconv
mkdir /home/chris
cp /etc/skel/* /home/chris/


...is faster than this....

useradd chris
passwd chris


Well, thats just our personal preferences I guess. The useradd utility does more than just edit the password file too. It will check for duplicate UIDs and GIDs and it assigns them automatically if you don't specify one.


ChrisP
 
fluffybunny,
I can't believe that someone would actually take the risk
of corrupting the vital auth mechanism for a machine because
he/she believes that concatenating arguments is too much
trouble. I would say that this is a minority view.
Furthermore, from personal experience it isn't a good idea
to do everyhting manually. Most of the editors and better scripts make a backup of the file opened to save from change to change. Your method does not allow for this automagically.
This is a high risk method. If you have ever seen the
login message "Go away you don't exist.." you'll know what I mean.
If you don't like the interface, hide it...
You can wrap it in a tcl/tk script, shell/awk script with
dialog frontend,i.e: add to the functionality as you go.
 
fluid11,

To answer your earlier question:

"TANSTAAFL" is an acronym for "There Ain't No Such Thing As A Free Lunch" ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top