Re: adding all users to group
On Mon, Jan 21, 2002 at 06:59:21PM -0800, email@example.com wrote:
| I'm trying to find a way to
| add all my users to a group.
| Is there a simple command to do this?
# for USER in `cat /etc/passwd | sed "s,:.*$,,"` ; do adduser $USER <group> ; done
Unfortunately this method will catch all system users too. An
alternative would be to list /home, if you have no subdirectories
(the shell is your friend! learning it comes in handy sometimes)
"He is no fool who gives up what he cannot keep to gain what he cannot lose."