Login Shell / Non-Login shell Clarification needed (RHEL 6.3)
Today a user has come up with a issue that he screwed up his profile file (.cshrc) and from the next attempt itself the server didnt let him to log in. The server is a remote one and me (local admin) too dont have the root/sudo permission on it.
I tried to overwrite his profile file with another file using scp/sftp, but somehow it was failed.
Then what i did was, invoked WinSCP from my windows laptop and did easily renamed his profile file. Problem solved, now he is able to login without any mess.
Now i am pretty sure the shell invoked by winscp is not a login shell hence it simply shown the contents of his home dir and allowed to delete the file.
Then why, scp/sftp from another linux machine didnt let me to overwrite the same. Here also it should have used a non-login shell to copy the file.
Please someone clarify, where i am misunderstanding?