PHAS User Account Maintenance

PHAS Accounts Overview

Account maintenance scripts:


Creating Accounts

There are 4 ways to create a PHAS account:

addusr: This is the main account creation script for creating all but undergraduate accounts.

register: This script will create an account appropriate for an undergraduate student.

webreg: This script is used to create undergraduate student accounts via the Computer Lab Kiosks in Hennings 203 and 205 (marked "REGISTER HERE").

add_many: Script to create multiple accounts from a file of usernames and other information.

Back to Top

Users.db Meta-data File

/opt/sysadmin/common/passwd/users.db:
This file conntains one record for each account with the following fields:

username:Full Name:Account:Category:ExpDate:Account#:student#:Comment

Excerpts of prompts from the addusr script:
Choose a category:
System = account needed for system software
Ugrad = an undergraduate student
One of -> Adj-Assoc, Faculty, Grads, Others, Postdocs, Staff
= dept. member (ie. Admin staff will enter into database) and will be
on corresponding email list
Misc = generic account for course (eg. physNNN) or group (eg. mbelab)
- expiry date required
Visitor = default - expiry date required

Enter account - "?" to see list [Unknown]: ?
Valid Accounts are:
Affleck Ahlborn Ampel Astr310 Barth
Behr Berciu Bonn Brewer Bryman
Celler CGay Chemistry Choptuik Clab
Clark Co-op Damascelli Dept Dilling
etc.
Back to Top

Setting/Changing Passwords

passwd:

initpw:

Back to Top

Converting Undergrad Accounts to Grad Accounts

Please see: This document.

Back to Top

Samba (SMB) Password

Back to Top

PHASPDC (Windows domain controller) and Samba Password

Back to Top

LDAP Server

Back to Top

Propagating Accounts to the other servers

Accounts are propagated to other unix platforms by rsyncing to the following files from hyper:

The addusr/passwd scripts call a function (pgs_gen) which:

When modifying /etc/group by hand: It is necessary to force the propagation via the command:/opt/sysadmin/common/passwd/prop_pgs group 

The workstations in the computer lab (Hennings 203) now authenticate users via LDAP.

Back to Top

Mail server policy

As of 2009-08-27 we no longer automatically enable email for all users.

Back to Top

Printer Billing

The Accounts field in the users.db file is used to assign usernames to a supervisor or group for printer billing as well as account expiration. The data in the users.db file is uploaded daily to MySQL database sysadmin.phas_users. Run via crontab on falcon:

# at 5:30AM every day: upload /opt/sysadmin/common/passwd/users.db to the dbase03:sysadmin.phas_users table
30 5 * * * /opt/sysadmin/common/passwd/phas_users_dbase03.pl > /dev/null 2>&1
Account names (eg. Affleck) are mapped to a speedchart in the MySQL accounts database by monthly printer billing script to save printer page counts in sysadmin.printing table. Run manuall (previously via crontab) on cups:
# at 7AM on the first day of every month: save non-cash printing balances and zero them out
0 7 1 * * /opt/sysadmin/printing/monthend.pl > /dev/null 2>&1
Back to Top

Account Policies

A random set of policies:

Back to Top

Expiring and Deleting Accounts

Account Monitoring:

Procedure for expired Visitor, XFaculty/XStaff/XGrads/etc accounts:

Email aliases will be kept for a maximum of three (3) months after the "Deletion Date"

Procedure for expired Ugrad accounts:

Tools in /opt/sysadmin/common/passwd/:

Back to Top

Moving Forward

Current Situation
Ideal Future Situation
What happens when an account is created?
- assuming we already have all the relevant meta-data:

   1. a new record is added to: /etc/passwd, /etc/shadow and users.db file
   2. home directory on file server is created with default environment files
   3. home directory on mail server is created with default sieve file
      IF Category is not part of "everyone"
          * THEN a .forward file is created to disable the email account
          * ELSE the address is added to the events@phas list
   4. a pykota account is created as appropriate for Category
   5. /etc/passwd and /etc/shadow are propagated to the other unix servers:
                 alpha beta delta mail omega


Web form for creating accounts:
   (restricted to IT staff - authenticated on Intranet)

   1. ask for type of account (Category), username, name, etc. - similiar to addusr prompts.
   2. add record to local /etc/passwd, shadow files (necessary?)
   3. add record to sysadmin.phas_users table (formerly users.db file)
   4. create home directory on alpha (via NFS mount or script via ssh?)
   5. create home directory on mail server (same question - script currently used allows for disabling ugrad addresses)
   6. add record to pykota for printing
   7. run script to propagate /etc/passwd, shadow to other servers,
 OR just update the LDAP server and have our login/file/mail/smtp/print/web servers consult it for everything (eg. shells, groups)

What happens when a password is set?

   1. they are prompted to enter a password deemed secure enough twice
   2. the password is set on the local host (hyper)
   3. /etc/samba/smbpasswd file is updated - a new record is added if necessary
   4. the PDC is updated - a new account is created if necessary
   5. the LDAP server is updated - a new account is created if necessary
   6. /etc/shadow is propagated to the other unix servers


Web form for setting a password:
   (only restriction is able to authenticate on Intranet)

   1. ask for new password and test password strength (good enough?)
   2. send password to LDAP server (not necessary to set on unix servers?)
   3. send password to PDC
   4. samba also covered by LDAP??


Account maintenance:

See the Expiring/Deleting Accounts section above.
Web form for maintaining accounts:
  • the users.db file can be replaced with the existing MySQL table, sysadmin.phas_users - any new fields required?
  • the existing account monitoring scripts would work unmodified since they use the database and just send emails to acctadmin@phas
  • we could just use phpMyAdmin to modify the phas_users database, but probably we will want a smart web form
  • basically we have to reproduce all the procedures outlined in the Expiring/Deleting Accounts section above 
  • the undergrad accounts would be fairly easy to maintain via a script (complicated existing procedure is more historical than necessary)
  • the "everyone" and visitor accounts have received more individual treatment ...
  • what about System accounts?  Do we need to maintain a system for propagating across servers, or just create/delete as and where needed?
  • ... then there's the 188 Misc accounts ...


Do-list:
Back to Top

NewUser.ps1



ChnageUserPwd.ps1