My problem: I cannot set my default shell for user 'student' on CentOS 7 to fish-shell. I installed fish-shell by downloading the .gz, configuring, make, make install. output of which fish/usr/local/bin/fishrunning su from the standard 'student' account, I am able to escalate myself to root, which fish is set as the default shell. But when I runstudent@localhost ~> whoamirootstudent@localhost ~>/rootstudent@localhost ~> sudo chsh -s /usr/local/bin/fish studentChanging shell for student. chsh: user attribute not changed: Invalid contents of lock `/etc/passwd.lock`looking at /etc/passwd I can see no changes occured. Any idea what I can do? It looks like the lock files are preventing me from proceeding. 
Can't set my shell as fish shell due to error when using chsh due to lock file
command line;fish
Looks like one of your previous attempts to change the /etc/passwd file has left some rubbish in the lock file.That lock file prevents multiple updates that would cancel each other out. If you are the only one using that system, remove the file /etc/passwd.lock and try again.