LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] adding users to groups

[ILUG] adding users to groups

Brian Foster blf at utvinternet.ie
Fri Feb 29 19:24:53 GMT 2008


  | Date: Fri, 29 Feb 2008 09:27:47 +0000
  | From: "Lisa Muir" <34.24.34 at gmail.com>
  | 
  | On Fri 29 Feb 2008, Brian Foster wrote:
  | >  | Date: Fri, 29 Feb 2008 06:10:54 +0000
  | >  | From: "Lisa Muir" <34.24.34 at gmail.com>
  | >  |[ ... ]
  | >  | I can hand edit /etc/group to add [a new user to an existing group].
  | >  | but I'd like to do it through groupadd or useradd.  [ ... ]
  | > 
  | > `useradd -G ...'  or  groupmod(8) ?
  | 
  | Looked at both of these before posting, groupmod lets you change group
  | names and group id's and not add users to groups,

 on my SUSE 9.1 box `groupmod -A USER GROUP' is documented
 as adding USER to GROUP.  but I did not see this option on
 Ubuntu 7.10, where `gpasswd' looks like the command to use.

  |                                                           useradd -G
  | would change apache from one group to another without leaving them in
  | the existing group unless all existing groups were specified... or
  | that could be just my bad interpretation of the man file.

 you should not be using `useradd/ on an existing user!
 you should only run it once, to create a new user.
 that is, you specify, using `-G ...', the groups you want
 the new user to be in.  (it is clearly possible there's
 another Ubuntu/SUSE difference here; I didn't check?)

  | On Fri, Feb 29, 2008 at 8:04 AM, Paul Mullen wrote:
  | > gpasswd -a <username> <group>
  | >
  | > gpasswd(1)

 as a point of interest, this command does not seem to
 exist on SUSE 9.1, albeit it does on Ubuntu 7.10; i.e.,
 another distro/version/something difference here.
 ( as a Wild Guess, and keeping in mind the age of
  SUSE 9.1, I'd guess these differences are a LSB
  issue; i.e., Ubuntu follows the LSB whilst the SUSE
  in question is "too old". )

cheers!
	-blf-
-- 
“How many surrealists does it take to    |  Brian Foster
 change a lightbulb?  Three.  One calms  |  somewhere in south of France
 the warthog, and two fill the bathtub   |     Stop E$$o (ExxonMobil)!
 with brightly-coloured machine tools.”  |       http://www.stopesso.com



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell