Reset password

From Earlham CS Department
Jump to navigation Jump to search

Resetting password is a very common issue asked frequently by the users. Therefore, it is essential to know the basics of how to reset a user's password to the default password (123.abc) when needed. This is a step-by-step guide to how to reset password. Once you are more familiar with LDAP server and its commands, you can manipulate the directories much more freely. For now, this guide will suffice as a basic guide to changing password.

For CS side

Use the following steps to change password for a user with the name userName

  1. SSH to auth.cs.earlham.edu and sudo to root using command: sudo su - root
  2. cd to folder /root/ldap-files
  3. Run this command: python3 change-pass.py -u userName
  4. The user will receive an email with their new password, which they can use to login to Bowie. In Bowie, the user can change it using command passwd. The user will need to enter the password they just received in their email before entering their preferred password.

After running the python command, you should be able to see the user's new generated password that was sent to them through email at /root/ldap-files/tmp/change-pass.ldif.

In case the script has errors, you can reset password by running: ldappasswd -x -D "cn=manager,dc=cs,dc=earlham,dc=edu" -W -S "uid=userName,ou=people,dc=cs,dc=earlham,dc=edu"

  1. Replace userName before running
  2. Enter the LDAP password for CS when prompted (ask if you don't know)
  3. Enter a temporary password you can give to the user
  4. Once done, let the user knows their temporary password and that they can change to their preferred one like the instruction above.

For Cluster side

Use the following steps to change password for a user with the name userName

  1. SSH to hopper.cluster.earlham.edu and sudo to root using command sudo su -
  2. cd to folder /root/ldap-files
  3. Modify the chg-pw.ldif file by replacing the uid= previousUsername to uid=userName
  4. Run this command: ldapmodify -f chg-pw.ldif -D "cn=Manager,dc=cluster,dc=loc" -W
  5. Enter the LDAP password for Cluster when prompted
  6. The password when trying to ssh to userName@hopper.cluster.earlham.edu will be 123.abc (default). The user can change it using command passwd
  7. Test the new password by trying to ssh to the machine as the userName using the default password.