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 10-28-2012, 04:49 AM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
"groupmod -A" missing


I am watching some videos meant to help prepare for the Linux+ Certification Exams (there's 2). This guy is using a Suse system for demonstrating. He then uses groupmod -A and it works on his system. However my groupmod does not have a -A option on CentOS 6.3. See the attached picture.
Attached Thumbnails
Click image for larger version

Name:	groupmod.JPG
Views:	45
Size:	75.1 KB
ID:	11072  

Last edited by fakie_flip; 10-28-2012 at 04:51 AM.
 
Old 10-28-2012, 05:40 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Too my knowledge, groupmod's -A option is Suse specific (adding multiple users to a group). The "out of the box" linux tools do not support this.

In general you can use usermod to add group(s) to one specific user:
Code:
usermod -aG group1,group2 user
 
Old 10-29-2012, 03:54 AM   #3
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
So without Suse, you can't add several users to a group in one command?

The example you show is adding a single user to several groups rather than adding several users to one group.
 
Old 06-02-2015, 03:26 AM   #4
TristanM-TX
LQ Newbie
 
Registered: Jun 2015
Posts: 1

Rep: Reputation: Disabled
I also saw a similar example using what I remember to be RHEL6. I mention it because it advised this:

[usermod -G groupname,groupname2 username --- When you add a member this way- you have to list the other groups they are members for as well, or they will be removed from any group not listed! use groupmod instead: groupmod -A "user1, user2, user3" groupname]

Out of paranoia, I would suggest testing out these on a particular version of Linux before blindly relying on them to do the expected (or unexpected) ... test and "cat /etc/groups" or id

I was cleaning out my old notes and am glad I caught this to flag. I just read that the thing about having to list all groups with usermod -G is verified in Solaris
 
  


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
Centos Server Failed @ Bootup: Missing "/sbin/blkid" & "fsck" command not found beagle7 Linux - Newbie 4 08-24-2012 01:33 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". badgerbox76 Linux - Games 13 01-11-2006 04:47 PM
suse ati driver "Xlib: extension "XiG-SUNDRY-NONSTANDARD" missing" madcow007 Linux - Hardware 0 03-06-2004 02:53 PM

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

All times are GMT -5. The time now is 02:22 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