Nicholas Dodds

Server notes

Server notes

Rough admin snippets and email templates for the HMC CS servers.

Drafts: verify commands before use. The CS servers quick reference has fuller, checked versions of most snippets.

Email aliases

Replace [user] with your username. Full steps: quick reference.

ssh [user]@ark
cd /etc/postfix/
co -l aliases_clinic
$EDITOR aliases_clinic
ci -u aliases_clinic
sudo newaliases

Password reset

Full steps: quick reference.

ssh cortana
passwd -i opendirectory -u USERNAME

Account lookups

Full entries: account lookups and LDAP lookups.

id username
getent passwd username
finger firstname
ldapsearch -LLLx uid=username

Disk quotas

Edit, view, and reset to the default. Full steps: quick reference.

sudo edquota username
sudo quota -vs -u username
sudo edquota -p quotatemplate username

DNS zone edits

Remember to increment the serial number. Full steps: quick reference.

ssh ark
cd /mnt/dns
rndc freeze cs.hmc.edu
co -l cs.hmc.edu
# Make edits
named-checkzone cs.hmc.edu cs.hmc.edu
ci -u cs.hmc.edu
rndc thaw cs.hmc.edu

Static IP assignment

A recorded example. Full steps: quick reference.

ip addr
ssh mudd@neutron.cs.hmc.edu
conf term
ip dhcp pool guest43
addr 134.173.43.228 client-id 0174.563c.bf6f.3e
clear ip dhcp bind 134.173.43.228
write mem

macOS DNS cache

Flush it when a Mac keeps resolving an old address:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Email: new Knuth account

Sent by Tim. Replace every XXXXXX with the account's details.

Hello,

At the request of XXXXXX an account has been made for you on the HMC Computer Science department servers. You can use it to log into the department's Linux servers (Knuth, Shuffler, Shadowfax, etc.) and the lab Macs in McGregor.

This account is separate from the HMC accounts issued by the CIS department and does not use the same password.

Username: XXXXXX
Password: XXXXXX

Please change your password as soon as possible.

You can change it either on one of our lab Macs (in McGregor 203, 204, or 206) or remotely using SSH.

Option 1: Lab Macs in McGregor:
1. Log in.
2. If prompted, choose to erase the Keychain.
3. Open System Preferences > Users & Groups > Change Password.

Option 2: Change via SSH:
1. Connect to Knuth:
ssh XXXXXX@cs.hmc.edu
2. SSH into Cortana:
ssh cortana
passwd

If your password isn't at least 12 characters long, you'll get an error.

Email: course or research account

Sent by Nic. Subject: cs181au ssh server login information -- Fall 2025. Fill in the {{ … }} fields.

Hello {{ first }},

Welcome to cs181au!

My name is Nic, and I'm the course technology coordinator for the CS department. I'll be assisting prof. Bang in administering the cs181au ssh server.

If you have any questions about the server or run into issues, feel free to contact me via email: ndodds@g.hmc.edu, or swing by my office: McGregor 304.

Here is your preliminary login information:

Username: {{ username }}
Temporary Password: {{ temp_password }}
(hyphens are included!)

Here are the account setup steps written out:

1. Open up a terminal instance, either in VS Code or elsewhere.

2. In the terminal, enter this command:
   ssh {{ username }}@cs181au.cs.hmc.edu

3. You may be asked to verify your ssh key, in which case, type: yes

4. You should be greeted with a prompt to enter your temporary password: {{ temp_password }}
   (Note that it will look as if nothing is being entered if you type or paste into the field-- this is simply a security feature. The password is being entered.)

5. Upon entering the server, you will be immediately prompted to change your password to something new.
   a. You will first need to enter your temporary password again: (This is a frequently missed step!)
      {{ temp_password }}
   b. Then you will be prompted to enter a new password of your choosing.
   c. You will be asked to confirm the new password by entering it again.
   d. You will then be automatically logged out of the server.

6. Type: ssh {{ username }}@cs181au.cs.hmc.edu

7. Now enter your new password.

8. If all has gone well, you should be logged in!

I hope you have a wonderful time in the class!

--Nic