[Klug-general] managing multiple users

David Halliday david.halliday at gmail.com
Fri Sep 24 09:37:22 UTC 2010


One last link before I have to return to databases and load errors now that
some processing has finished (and an error log for ant scripts).

Someone is confused that the behaviour of cat is wrong (for him) but it
might be that what he is getting is what you want:
http://www.programmingforums.org/post39095.html

<http://www.programmingforums.org/post39095.html>Sorry I'm not able to
formalise this specifically for your situation but hope it helps. Always
limited by time and availability of scripts/reference stuffs.

On 24 September 2010 10:32, James Morris <jwm.art.net at gmail.com> wrote:

> On 24 September 2010 10:18, Evan Ingram <evan.ingram at cariss.co.uk> wrote:
> > I had come across that link already :)
> >
> > It prints all the usernames on seperate lines, what would I have to do
> > to get them all on oneline... userA userB userC?
> >
> > Or is there a way the usermod script can take usernames on different
> > lines?
> >
> > #!/bin/sh
> >
> > for USER in
> > userA
> > userB
> > userC
> > userD
> > userE
> > ; do
> >  usermod -G USERS $USER
> > done
> >
> > ????
> >
>
>
> #!/bin/sh
>
> #notice backticks
> USERS=`cat /etc/passwd |grep /bin/bash |grep [0-9][0-9][0-9] |cut -d: -f1`
>
> for USER in $USERS
> do
>  usermod -G USERS $USER
> done
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20100924/919b6991/attachment-0001.htm>


More information about the Kent mailing list