Solved

How to ADD multiple users to a group in one cmd line?  RHEL5.

Posted on 2009-07-13
3
530 Views
Last Modified: 2013-12-06
How do you add mutliple users to a group at one time from the command line?
0
Comment
Question by:Sp0cky
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 65 total points
ID: 24839960
There is no command line utility which will accept multiple usernames, afaik.
Run something like
for u in user1 user2 user3 user4 ; do usermod -a -G [newgroup] $u ; done
0
 
LVL 3

Assisted Solution

by:betty85
betty85 earned 60 total points
ID: 24839986
0
 

Author Closing Comment

by:Sp0cky
ID: 31602808
Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now