[Klug-general] managing multiple users
Evan Ingram
evan.ingram at cariss.co.uk
Fri Sep 24 08:51:23 UTC 2010
Hi all
I always assumed managing users would be a lot simpler in linux, but im
struggling to find an easy way to add 500+ users into groups. Got a
couple of groups that I need all users to be a part of.
#!/bin/sh
for USER in userA userB userC userD userE; do
usermod -G USERS $USER
done
script above should do the trick, but then I'd need to get a list of all
my usernames in the correct format, ie userA userB userC, so i'd have to
use a combination of awk/sed/whatever on /etc/passwd. Is there an easier
way?
cheers
More information about the Kent
mailing list