bash script to create user then create ssh keys

view story

http://serverfault.com – Please note I am a total linux newbie, please bare that in mind when answering this question as I have very limited knowledge of linux. OS: Debian Squeeze I am using ZSH and have created a function called webuseradd it looks like this: function webuseradd () { echo creating user $1; mkdir /usr/share/nginx/$1; # sshlogin is required to allow user to ssh and sftp sudo useradd -G lshell,sshlogin -b /usr/share/nginx/$1/home -d /usr/share/nginx/$1/home -m --skel /etc/httpskel -K UMASK=027 $1; # /usr/share/nginx/$1 will be the chroot so set it to root sudo chown root:ro (HowTos)