Interview Prep/Linux/SSH, sudo and authentication

`su - appuser` returns `This account is currently not available.`

BeginnerTroubleshootingSSH, sudo and authentication
Answer

Likely causes → The account's shell is /sbin/nologin, by design for service accounts.

Diagnose →

getent passwd appuser

Fix → Run commands as the user without changing their shell: sudo -u appuser -s /bin/bash or sudo -u appuser <command>. Only change the shell if there's a real need.

Prevent → Document how admins should act as service accounts.

All Linux questions Roadmap: Linux

More on SSH, sudo and authentication