Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-06-2012, 05:42 AM   #1
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215
Blog Entries: 1

Rep: Reputation: 21
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?
Old 12-07-2012, 01:51 AM   #2
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,098

Rep: Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989Reputation: 2989
I think you missed another point: the shell used by winscp is not an interactive shell
see here:
or here:
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.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check in a script whether the shell is login or non login? frankie_DJ Programming 7 10-21-2015 11:09 AM
Difference between normal shell and login shell Manish Linux - General 7 11-14-2012 09:30 AM
login and non-login shell question charging-ibis Linux - Newbie 3 09-12-2012 01:13 PM
How do I get the /etc/login.defs in a non login shell acummings Slackware 7 05-20-2007 11:17 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 09:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration