Guide to creating a new administrative user with admin privileges for various services.
Contents
TODO: Write a create-admin-user script that does this all automatically (add it to the scripts git repo)
NAME = Member's non-administrative username. All commands should be run from ServerGibran (or the current administrative server).
1. Basic Setup
Steps required to create a minimally functional admin user.
1.1. Creating the user
/afs/hcoop.net/common/etc/scripts/create-user-new NAME_admin sudo kadmin.local cpw NAME_admin # set randomly generated initial pw
The user will now exist in Kerberos, AFS, and DomTool but have no administrative permissions.
1.2. Administrative Email Lists
In ~hcoop/.domtool/hcoop.net add the new admin users to the admin_emails list which will add them to the needed mail aliases to receive admin mail.
Also add emailAlias "NAME_admin" "NAME"; so administrative emails are forward to the admin's normal mail account.
TODO: update AdminArea with list of lists that admins are expected to not ignore.
1.3. SSH Access, Sudo On Administrator-Only Servers, and Kerberos Admin
In Puppet, modify modules/hcoop/manifests/init.pp and add the new admin user to the $admins list. This will allow them to connect to all servers and have sudo which will also grant access to locally administered services like Postgres and MySQL.
This also grants them kerberos administrator privileges. FIXME: do we make that optional? MitKerberos admin powers are very broad, and perhaps not all admins will need them.
1.4. Puppet Environment
Create a puppet environment for the new admin as described in ConfigurationManagement#Personal_Environments which allows them to actually make changes to system configuration. All system changes are made through Puppet.
1.5. Portal Admin
On the Portal Groups Management Page add the admin's member account to the root group. This enables full access to portal administrative features and allows the admin to view support requests.
2. Services
Although not strictly needed, the admin will not be able to handle all support requests without these.
2.1. DomTool Administrator
To grant full admin permissions: domtool-admin grant NAME_admin priv all
DomTool/ArchitectureOverview#Standard_ACL_classes has a list of all valid values for priv which can be used instead of all if more limited administrative permissions are desired.
2.2. AFS Administrator
AFS administrative permissions are controlled by membership in the system:administrators group, so if a user is intended to have AFS admin privileges: pts adduser NAME_admin system:administrators.
2.3. BugZilla administrator
Admin access is required to edit groups, components, etc. The only common administrative option is likely to be changing group membership and the default assignee for various components (e.g. modifying board and financial default assignee after an election).
Use the [edit users panel](https://bugzilla.hcoop.net/editusers.cgi), find the admin user account (they must login to bugzilla at least once for their account to exist), and add the admin flag. If the admin should be allowed to create further admin accounts then the "Can turn these bits on for other users" flag should also be set.
2.4. Wiki administrator
Add new admin's wiki account to the list on AdminGroup
2.5. Digital Ocean Administrator
If the admin requires access to the Digital Ocean hcoop project (e.g. for remote console access), they must first register directly with Digital Ocean as USER@hcoop.net. Then the board administrative account should be used to add the new admin at level "Modifier" or "Resource Viewer" to our project at Digital Ocean. This will allow them to view and interact with the project, use the remote console to access servers, provision new resources, and create/modify monitoring rules (at the "Modifier" level). The "Owner" level should only be assigned to the board account, and the "Member" level should be given only to very trusted admins since it allows destructive actions like deleting entire servers.
