* Pizarro ISP UY1 Guide The Pizarro UY1 shared hosting is as vanilla, boring, and predictable as is practical. We rent full UNIX shells in a shared hosting environment. Documentation follows. ** user caveats for webhosting - your user account will show up with a ~/www/ directory - your homedir needs to be chmod 0701 - your www dir needs to be chmod 0750 (chmod -R 0750 ~/www/ ) ** operator guide *** new users emplace the following script somewhere on your path (~/bin/ is a fine place): ######## BEGIN NEW USER SCRIPT ######## #!/bin/sh set -eu # args come in as $1, $2, $3 # username is the username # ssh_key_file is the SSH public key file customer provided username=$1 domain=$2 ssh_key_file=$3 operator=$(who am i | awk '{print $1}') read -s -p "new user password: " user_password printf "\n" # ssh-keygen fails if key is invalid, which will kill the script ssh-keygen -lf $ssh_key_file useradd $username cat $ssh_key_file > /home/$username/.ssh/authorized_keys chown $username:$username /home/$username/.ssh/authorized_keys chmod 0701 /home/$username chmod -R 0755 /home/$username/www passwd $username < /etc/apache2/vhosts.d/$username.conf ServerName $domain ServerAlias www.$domain DocumentRoot "/home/$username/www" KeepAlive Off LogLevel info AllowOverride All Options FollowSymlinks Require all granted DirectoryIndex index.php index.html LogLevel warn EOF mysql -u$operator -p <