LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Login Shell / Non-Login shell Clarification needed (RHEL 6.3) (https://www.linuxquestions.org/questions/linux-newbie-8/login-shell-non-login-shell-clarification-needed-rhel-6-3-a-4175440243/)

kingston 12-06-2012 04:42 AM

Login Shell / Non-Login shell Clarification needed (RHEL 6.3)
 
Hi All

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?

pan64 12-07-2012 12:51 AM

I think you missed another point: the shell used by winscp is not an interactive shell
see here: http://docstore.mik.ua/orelly/unix3/upt/ch03_04.htm
or here: http://www.tldp.org/HOWTO/Path-6.html
or the man page of your shell. Also scp and sftp have their own initialization.
These files belong to the user, other users are not allowed to modify. I think you modified those rights also.


All times are GMT -5. The time now is 09:25 PM.