Changing username

For ClockworkOS, you won’t need to change your username to use your DevTerm. However, if you want (I certainly have), you can change it by following these steps:

  1. Log out of your current desktop session (Applications > Log Out — pressing the power button will also bring up the menu)
  2. Press the following keyboard combination: Fn + Ctrl + Alt + 1 (F1)
  3. Log in as root — the password is cpi
  4. Execute killall -u cpi to stop all processes under the user you want to rename
  5. Execute usermod -l newname -m -d /home/newname cpi to rename the user and move its home directory
  6. Execute groupmod -n newname cpi to move the user groups (including sudo access)
  7. Execute chfn -f "Your Name" newname to choose a new full name (shown top-right of the desktop session)
  8. Open up the LightDM config file for auto=login with nano /etc/lightdm/lightdm.conf.d/12-autologin.conf
  9. Change line 2 to be autologin-user=newname
  10. Press Ctrl + X, then Y, then Enter
  11. Execute reboot to restart the system

Your username should now have been changed! If you don’t want autologin, you can comment out all of the lines in 12-autologin.conf by prefixing them with the # symbol.

Hope this helps for people who want to rename their username! Other things you may want to do:

  • Change your password with passwd under your newly-renamed account
  • Change the hostname from clockworkpi-a06 by editing /etc/hostname (requires superuser privileges)
2 Likes