adduser script for cygwin and NT/2000/XP
Jon Clegg
jonclegg@yahoo.com
Mon Jan 13 03:04:00 GMT 2003
Hello,
I have created a adduser script for NT/2000/XP, itÂs
not general purpose as it assumes you are running a
ssh server, however it shows that is is necessary to
restart sshd once a user is added; This is not
obvious, and has taken me a while to figure that out
myself.
I am posting this basically so that anyone else who
had the same problem I did will have a drag and drop
solution, I would have loved to have seen this when I
was looking for an answer.
Enjoy,
-Jon
------ adduser.sh -----
!/bin/sh
if [ $1 ]; then
net user $1 /add
passwd $1
mkpasswd -l > /etc/passwd
net stop sshd
net start sshd
else
echo "User name is required";
fi
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list