LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CLI keyboard shortcuts/ commands not working for non-Root users (http://www.linuxquestions.org/questions/linux-newbie-8/cli-keyboard-shortcuts-commands-not-working-for-non-root-users-4175441998/)

jsp_1983 12-18-2012 01:09 PM

CLI keyboard shortcuts/ commands not working for non-Root users
 
When I switch user from Root to someone else, I'm unable to use keyboard shortcuts, like tab for completing file and directory names, or the up arrow for previously used commands.

How can I enable them for non-Root users?

I'm using Ubuntu 11.10.

archShade 12-18-2012 02:10 PM

My guess is that when you su your shell changes to plain ol' sh. Easy way to check is to check is to call
Code:

echo $SHELL
I think
Code:

echo $0
will work as well

I don't know a perminent fix (google might) but just running your favorite shell (Ubuntu defualts to dash) after you su may help.

Anyway HTH.

jsp_1983 12-18-2012 02:42 PM

Ahhh, that makes a lot of sense - thanks!

Turns out it's just running 'sh' rather than 'bash', so I need to find a way of changing the shell, as you suggest. That sounds like it should be relatively easy to fix.

archShade 12-18-2012 05:11 PM

Like I said I am not sure there is an easy way to do this (well without changing the users shell).

How often do you have to su to another user if its once in a blue-moon then it will probably easier just to type bash/dash/ksh/tcsh/csh after you su. The problem here is that you have to type exit twice to leave the su function. Like I said it's not a major issue if you do not do it a lot if your doing it several time a day could get frustrating depends how much you enjoy typing?

jsp_1983 12-18-2012 06:53 PM

Quote:

Originally Posted by archShade (Post 4852226)
Like I said I am not sure there is an easy way to do this (well without changing the users shell).

How often do you have to su to another user if its once in a blue-moon then it will probably easier just to type bash/dash/ksh/tcsh/csh after you su. The problem here is that you have to type exit twice to leave the su function. Like I said it's not a major issue if you do not do it a lot if your doing it several time a day could get frustrating depends how much you enjoy typing?

I do it quite often. I normally log in to my server as root (which, I suppose, I shouldn't...), but every user other than root just has normal shell. I don't mind the fix you mention, but I'll see how I can make it permanent. I'm just pleased I've got an explanation as to why I couldn't use the keyboard shortcuts!


All times are GMT -5. The time now is 07:14 PM.