This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]