useradd -d $dir -m -s $shell -u $uid $username
is the default. If the file exists but is empty, cp -pr /etc/skel $dir; chown -R $uid.$gid $dir
is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username
, $uid
, $gid
, $dir
, and $shell
.
userdel $username
is the default. If the file exists but is empty, rm -rf $dir
is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username
and $dir
.
[ -d $old_dir ] && mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir )
is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $old_dir
, $new_dir
, $uid
and $gid
.
[ -e homedir/.qmail-domain-default ] || { touch homedir/.qmail-domain-default; chown uid.gid homedir/.qmail-domain-default; }is run.
identity.pub
file to ~root/.ssh/authorized_keys
on the remote machine(s).
-t
option to ssh-keygen, and append the created id_dsa.pub
or id_rsa.pub
to ~root/.ssh/authorized_keys2
on the remote machine(s).
PermitRootLogin without-password
(meaning with keys only) in your sshd_config
file on the remote machine(s).