Unable to Change Shell via WHM or CLI
- Written by Vanessa Vasile
- Published in Fixes
- 1 Comment
- Permalink
When trying to change a user’s shell via WHM, you may occasionally see the following error:
Shell could not be modified
As shown below:
Attempting to change the shell via command line fails as well:
# chsh -s /bin/bash myuser
Changing shell for myuser.
setpwnam: File exists
Shell *NOT* changed. Try again later.
This means there is a lock on the /etc/passwd file. Simply deleting /etc/ptmp fixes this problem:
rm /etc/ptmp
1 Comment
nice.. thanks for this I was able to change shell access in one of my accounts inside WHM. 😀