how to create a new user

Ryan T. Sammartino ryants@shaw.ca
Tue Feb 12 13:17:00 GMT 2002


On Tue, Feb 12, 2002 at 01:57:48PM -0500, Alex BATKO wrote:
> 
> OK.  I have a particular user who already has a windows account,
> but now i'd like to be able to allow that user (username: billy)
> to ssh into the domain controller (to be able to use cygwin).
> 


This is what I do:


#! /bin/bash

mkpasswd -d -u $1 | sed -e 's/:\([A-Za-z0-9_-]\+\),\([A-Za-z0-9_-]\+\),U-/:\2\1,U-/g' >> /etc/passwd



Save that as "adduser.sh", then you can just "adduser.sh billy".

The sed script is to turn real names from Lastname, Firstname
to Firstname Lastname, since the extra comma causes issues.  If that
isn't an issue for you, then remove the sed script.



-- 
Ryan T. Sammartino
http://members.shaw.ca/ryants/
Good day to avoid cops.  Crawl to school.

--
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