LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2013, 08:43 PM   #1
gally
LQ Newbie
 
Registered: Nov 2013
Location: Northern VA
Distribution: Ubuntu 10.04
Posts: 2

Rep: Reputation: Disabled
complex useradd to existing group


Hi,

In Ubuntu 10.04, I'm attempting an complex (unfamiliar) command at the direction of an instructional aid (for Rails deployment):

Code:
sudo useradd --comment "Puppet" --no-create-home --system --shell /bin/false puppet
This command is failing, however:

Code:
useradd: group puppet exists - if you want to add this user to that group, use -g.
I do not understand the intent behind the complex command. My question is how can I (understand and) honor the intent of the original command while adding the desired user and group ("puppet") using the -g option?

Thanks,

G
 
Old 11-06-2013, 08:56 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

those options you are using appear to be for adduser not useradd (although I don't know about --comment). Are you sure you're running the correct command? Double check whatever documentation/tutorial you are following and check the man pages for adduser and useradd.

HTH,

Evo2.
 
Old 11-07-2013, 08:01 PM   #3
gally
LQ Newbie
 
Registered: Nov 2013
Location: Northern VA
Distribution: Ubuntu 10.04
Posts: 2

Original Poster
Rep: Reputation: Disabled
changed to adducer and command succeeded

The document I am following does indeed useradd, but I followed your proposal and tried the following:

Code:
sudo adduser --no-create-home --system --shell /bin/false puppet
The result was as follows:

Code:
Adding system user `puppet' (UID 106) ...
Adding new user `puppet' (UID 106) with group `nogroup' ...
Not creating home directory `/home/puppet'.
I'll assume the intent is met by these results, so thanks.

G
 
Old 11-07-2013, 08:11 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by gally View Post
The document I am following does indeed useradd,
I always forget which is which and end up having to check the man pages each time. So it's not so surprising to me that there could be some documentation somewhere that also mixed up the two commands.

Quote:
but I followed your proposal and tried the following:

Code:
sudo adduser --no-create-home --system --shell /bin/false puppet
The result was as follows:

Code:
Adding system user `puppet' (UID 106) ...
Adding new user `puppet' (UID 106) with group `nogroup' ...
Not creating home directory `/home/puppet'.
I'll assume the intent is met by these results, so thanks.
Yep, looks like that worked correctly.

Cheers,

Evo2.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Useradd to group praveenvikram24r Linux - Newbie 2 07-26-2012 03:50 PM
info about useradd & /etc/skel working with existing home folder andrea_g90 Linux From Scratch 5 05-11-2011 06:41 AM
add an existing user to an existing group? tramni1980 Slackware 5 05-08-2008 07:28 PM
useradd: unknown group turbofisch Linux - Newbie 4 04-06-2004 06:19 AM
Complex group usage opteek Linux - General 3 04-12-2002 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration