en:software:student_accounts

This page is outdated and needs to be updated!

Student accounts on a12

We have scripts that create and delete user accounts for the students. The first script generates user accounts with a customized HOME directory, links, and user rights. This script is located in:

~pollux/opt/mk_accounts.bash .

This script can set up a single or multiple user accounts. The first argument needs to be an ASCII file with the user names and passwords. The user names need to be in the first column and the passwords in the second. If only a specific user account should be created, the corresponding user name needs to be supplied as a second argument. Note that this user must be also listed in the file with the user names and passwords. A calling sequence to set up a single user account could look like this:

sudo ~pollux/opt/mk_accounts.bash user_ss2010.txt ma2

and to set up all users listed in the file user_ss2010.txt:

sudo ~pollux/opt/mk_accounts.bash user_ss2010.txt .

The students accounts need to cleared every semester. This task is automated by the second script:

~pollux/opt/del_accounts.bash .

This script deletes the student accounts and saves a backup of the corresponding HOME directory in:

~/pollux/cleanup/ .

This script expects two or three arguments. The first argument is again an ASCII file with a list of usernames for the accounts to be closed. The second argument is the name of the subdirectory where the backups should be saved. The third argument is again optional and must be specified if only one specific account is to be closed. The first argument has no meaning in this case and can be replaced by dummy, for example. A calling sequence to close a specific user account could look like this:

sudo ~pollux/opt/del_accounts.bash dummy ss2010 ma2

and to close all user accounts listed in the file user_ss2010.txt:

sudo ~pollux/opt/del_accounts.bash user_ss2010.txt ss2010 . 

In both cases the backups will be saved in:

~/pollux/cleanup/ss2010/ .
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • en/software/student_accounts.txt
  • Last modified: 2021/10/27 21:07
  • by rhainich