This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
adduser script for cygwin and NT/2000/XP
- From: Jon Clegg <jonclegg at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 6 Jan 2003 17:05:51 -0800 (PST)
- Subject: adduser script for cygwin and NT/2000/XP
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/