0
How would I go about converting this bash script:
mkdir /store/sftp/%USERNAME%
sudo useradd -d /incoming %USERNAME%
sudo passwd %USERNAME%
## Password needs to be typed or passed in here
sudo usermod -g sftp %USERNAME%
sudo usermod -s /bin/false %USERNAME%
sudo chmod 755 /store/sftp/%USERNAME%
sudo chown root:root /store/sftp/%USERNAME%
sudo mkdir /store/sftp/%USERNAME%/incoming
sudo chown %USERNAME%:sftp /store/sftp/%USERNAME%/incoming
To accept a username and a password?
1Please be aware that command line arguments can generally be seen by other users on the system. – coneslayer – 2010-04-07T15:45:44.093
True, but this is a closed environment where only an admin can get in, and all other users have been "jailed" away for SFTP purposes. – Urda – 2010-04-07T15:52:33.017