[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Hi
Thank you for your help but I am afraid I am being remarkably dense.
What I want to do is check that the user is or is not a member of uucp.
If he is not I need to add him.  The following works (except the gpasswd
bit which I will test on another machine! (What faith!!).
#! /bin/sh
groups > temp
if grep -w 'uucp' temp; then
        echo "thats great," ${USER} "is a member of uucp"
        else echo "Oh Dear"
        # sudo gpasswd -a ${USER} uucp
fi
rm temp
However I do not think it is very elegant, and I do not like putting
temp  files on other peoples machines.
All the best
Peter L-J
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html