I was having an issue logging into shell with one of my users.
Checking the tail of the auth log:
sudo tail /var/log/auth.log -n 200
We have an error:
sshd: User myusername not allowed because shell /sbin/nologin does not exist sshd: input_userauth_request: invalid user myusername [preauth]
It seems shell access was disabled for this user previously.
We can try setting the shell path back to
/bin/bash – this is the default for Ubuntu.
sudo usermod -s /bin/bash myusername
Now try logging in again.
You can see a list of users and their shell paths in
sudo less /etc/passwd
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.
p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how.
THANK YOU THANK YOU THANK YOU!!! This has been driving me f****** crazy all morning!!
This fixed my issue on OpenVPN AS