Solved

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

Posted on 2009-07-13
3
533 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

730 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