Creating student users on Ubuntu is pretty straight forward but a little housekeeping can make life easier.
Using Putty and SSH log in as yourself to the server.
or using whatever your username and server location is (IP Addresses work).
We can use the
/etc/skel folder to help us create the users. This folder should have a public_html folder inside it – you can check with:
If the listing returns nothing by the name of
public_html create it with:
sudo mkdir /etc/skel/public_html
This will ask you for your password as you are trying to trigger an
sudo superuser/administrator command. You can check this has worked with the
ls command used previously.
We are now in a position to add our users. Because we are using Usernames that Unix considered bad – they start with numbers we have to add an
--force-badname flag to the line. The
--ingroup users puts them into the user group so we can control their access enmass. You will then need to enter a password twice (same both times!) – I typically use their dates of birth YYYY-MM-DD as they won’t have access from outside school. You are then asked a few questions – please put in their full name and other as Cohort – this makes them easier to track. I usually put them in room 101 as it appeals to my sense of humour!
sudo adduser --ingroup users --force-badname 01666DEvil
They should now be able to access their websites via sFTP and http.
sFTP settings are:
- FTP Host = hostname.domain
- Username = as per addUser
- Password = as per addUser
- sFTP = tick the sFTP box
- Root Folder = public_html
HTTP = http://big-blue.local/~01666DEvil/
Providing when they upload the files they have a homepage called
index.html it should all work just fine. The only other possible problem is with permissions but care should be taken with altering these as you don’t want to provide cross user access to other more sensitive systems.
Log in to the server via SSH as before and type:
sudo passwd 01666DEvil
you will need to enter your password before their new password (twice) to change it.