On Thu, 2009-04-30 at 18:23 -0500, Robert Citek wrote: > Thanks, Theresa. Worked pretty well for me, too. There's no need to > do the killall as that works off the uid. So, to tighten it up a bit: > > $ sudo usermod -l bar -d /home/bar -m -c "bar" foo > $ sudo groupmod -n bar foo > > Or in script form: > > change_handle () { > old=$1 > new=$2 > sudo usermod -l $new -d /home/$new -m -c "$new" $old > sudo groupmod -n $new $old > sudo passwd -e $new > } > > Caveat emptor as it does no sanity checks. But the jist is there. > > I suspect these commands will not work for those programs that may do > additional checks, e.g. sshd or sudo. Or if authentication is handles > by a different mechanism, e.g. NIS or LDAP.
Well, I did test sudo, and that worked just fine (sudo su from newuserid put me into shell as root). Didn't mess with sshd, though -- is that something you could easily test? Theresa --~--~---------~--~----~------------~-------~--~----~ Central West End Linux Users Group (via Google Groups) Main page: http://www.cwelug.org To post: cwelug@googlegroups.com To subscribe: cwelug-subscr...@googlegroups.com To unsubscribe: cwelug-unsubscr...@googlegroups.com More options: http://groups.google.com/group/cwelug -~----------~----~----~----~------~----~------~--~---