?
Solved

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

Posted on 2009-07-13
3
Medium Priority
?
537 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 260 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 240 total points
ID: 24839986
0
 

Author Closing Comment

by:Sp0cky
ID: 31602808
Thanks!
0

Featured Post

Setting up LaraDock for Laravel

Learn how to set up LaraDock in a Laravel project - LaraDock gives us an easy way to run a Laravel application using Docker in a single command.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 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