LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-09-2009, 09:47 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Useradd -vs Adduser


I noticed something strange when I create a new user. Previously I always use to use the 'adduser' command to create a new user. The results showed this...

Code:
cturner:x:1021:100:Chris Turner:/home/cturner:/bin/false
However I recently started using a script that utilized the 'useradd' command. This creates the user fine however when it asks about the users information like room number, phone number, etc etc etc, it creates these messy ',' in the /etc/passwd file.

Code:
cturner:x:1021:100:Chris Turner,,,:/home/cturner:/bin/false
Is there a way to stop the useradd script from doing this? When it prompts me for this data, I normally press enter to leave it blank but I don't want to see these ',' entries in the fields when I finger these users.

Any info?
 
Old 03-09-2009, 11:10 AM   #2
mbostwick
Member
 
Registered: Feb 2009
Location: Where ever life takes me
Distribution: gentoo,opensuse,ubuntu, arch
Posts: 110

Rep: Reputation: 18
You can always edit the script as it is just a script: which useradd, then nano $PATH(from the which command)/useradd. You could also just remove the , , , as well.
 
Old 03-10-2009, 09:19 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
For right now I simply manually edited the /etc/passwd file and removed the ',,,' from each users entry however I find that annoying.
 
Old 03-10-2009, 11:10 PM   #4
mbostwick
Member
 
Registered: Feb 2009
Location: Where ever life takes me
Distribution: gentoo,opensuse,ubuntu, arch
Posts: 110

Rep: Reputation: 18
Why not just edit the script ?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 4.4 - no useradd or adduser command Micro420 Red Hat 5 04-04-2007 11:14 PM
useradd vs adduser shipon_97 Linux - Networking 1 10-03-2006 10:12 PM
Ncurses adduser or graphic useradd in Linux Freaks Linux - Software 1 09-22-2006 05:27 PM
commands: adduser and useradd kurrupt Linux - Security 2 10-19-2004 11:47 PM
Fedora - adduser/useradd doesn't work chongluo Linux - Newbie 2 03-25-2004 03:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration