Skip to content
Bernardo Bahia Monteiro edited this page Jan 24, 2024 · 26 revisions

Add a user account

  1. Define UNIQNAME=<person's uniqname>

  2. Get the new user umich uniqname and uid. To obtain the uid and other info run

    ldapsearch -x -D -W -b"uid=$UNIQNAME,ou=People,dc=umich,dc=edu" -h ldap.umich.edu -p 389 -Z

This will query the U of M directory for info on that uniqname. ⚠️ This service is not available as of Jan 24, 2024. in that case, omit the --uid $USERID in step 3

  1. Create a new zfs filesystem for the new user (for aurora and electra, not applicable for waverider)

For electra:

sudo zfs create spinners/home/$UNIQNAME

For aurora:

sudo zfs create rpool/USERDATA/home/$UNIQNAME

For waverider: skip this step as it does not currently use the super awesome zfs file system

  1. Create the user account with a random password

Create the account

If you set the USERID in step 1:

sudo adduser $UNIQNAME --uid $USERID --ingroup a2srl --disabled-login

Else:

sudo adduser $UNIQNAME --ingroup a2srl --disabled-login

Generate a random password with

PASSWD=$(head -c 9 /dev/urandom | base64)
echo -e "${PASSWD}\n${PASSWD}" | sudo passwd $UNIQNAME

Expire the password so that it has to be changed on the first login

sudo passwd --expire $UNIQNAME

Add the user to extra groups if needed. E.g., new sysadmins should be add to groups adm and sudo sudo adduser <uniqname> <group>

  1. (aurora and electra only) Copy skeleton files and change ownership

    sudo rsync -avh /etc/skel/ /home/$UNIQNAME

    sudo chown -R $UNIQNAME:a2srl /home/$UNIQNAME

  2. (electra only) Commit changes to etckeeper

    sudo etckeeper commit "Add user $UNIQNAME"

  3. Send an email to the new user informing that his/hers account was created. Include the password.

    echo $PASSWD

Upgrade distribution

Remember to run grub-install when the OS is installed on an SSD but boot is done through an HDD (that's the case for all servers)

Python3.6 is not available on Ubuntu 22.04, it has to be compiled from source: https://stackoverflow.com/questions/72102435/how-to-install-python3-6-on-ubuntu-22-04

./configure CFLAGS="-ftest-coverage" LDFLAGS="-lgcov" --enable-optimizations -with-lto --with-pydebug --prefix=/usr/local

Fix UM/NAST install

  • Fix symlinks bin/python and bin/python3
  • Uninstall and install numpy