LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-09-2007, 10:08 AM   #1
cthomas
Member
 
Registered: Aug 2005
Posts: 91

Rep: Reputation: 15
useradd -m -G accts -c "Name of User" "LoginID"


I trying to understand this command.

useradd -m -G accts -c "Name of User" "LoginID"

Add a user, -m = Create the user's home directory, -G = A list of supplementary groups which the user is also a member of., -c = What this one do?
 
Old 02-09-2007, 10:13 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Look at man useradd. From there we have:
Code:
       -c, --comment COMMENT
          Any text string. It is generally a short description of the login, and is currently
          used as the field for the user’s full name.
 
Old 02-09-2007, 04:44 PM   #3
cthomas
Member
 
Registered: Aug 2005
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PTrenholme
Look at man useradd. From there we have:
Code:
       -c, --comment COMMENT
          Any text string. It is generally a short description of the login, and is currently
          used as the field for the user’s full name.
So that is why I need the the "".
useradd -m -G accts -c "Name of User" "LoginID"

When I typed: useradd -m -G accts -c John Brown brown I got an error. I should only need "" around the user Name and not the user LogID right?
 
Old 02-09-2007, 05:18 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Right, unless you have blanks or other special characters in he LoginID. (Not recommended, but not, I believe, forbidden. It could, however, really make creating backups hard since, by default, dump does not understand special characters in file names, and the LoginID is used as the users home directory name.)
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
Samba --> nobody run "add user script = /usr/sbin/useradd ....." ??!! Unconfigured Fedora 1 02-23-2006 04:54 AM
Samba --> nobody run "add user script = /usr/sbin/useradd %u ....." ???? Unconfigured Linux - Software 1 02-21-2006 09:01 AM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:43 PM.

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