Solved

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

Posted on 2009-07-13
3
531 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Fine Tune your automatic Updates for Ubuntu / Debian
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

911 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

18 Experts available now in Live!

Get 1:1 Help Now