-   Linux - General (
-   -   bash shell not working? (

magyartoth 04-09-2002 02:28 PM

bash shell not working?
Here's a strange one.

Just installed a new email server running Red hat 7.2. I installed SSH and I can remotely SSH to the box fine, login and stuff, but a lot of the usual bash commands that Im used to are gone.

For example, useradd, userdel, usermod, route, fsck, as well as some others, are all missing.

I have my shell set as bash which is installed and working. When I log in, I don't get a 'missing shell' error, I just get the familiar bash prompt. Even when I 'su', I still can't use these commands.

HOWEVER, when I login locally as root, all the commands are there using bash.

Any thoughts? I'm stumped!

jpweston 04-09-2002 02:32 PM

Is there a separate profile for ssh/remote logins? If so, there may be some restrictions in there. Maybe check the startup sequence for SSH and see what it's reading for its configuration.


magyartoth 04-09-2002 03:04 PM

I installed SSH as an RPM when I installed everything else and left all the defaults in place. I checked sshd_config and couldn't find anything about paths.

I've noticed that when I do an env $PATH when remotely connected with SSH, that my path is really short(/bin:/usr/bin:/usr/local/bin), however it's a lot longer when locally connected with root.

Anyway of setting a general $PATH varible?


jpweston 04-09-2002 06:21 PM

You can set the PATH for a single session by doing

export PATH=$PATH:/whatever/you/want

To make it "sticky" for all future sessions it needs to be read from a config or profile file (i.e. for users that can be ~/.bash_profile or ~/.bashrc - the global profile is /etc/profile). That's why I'm thinking there is a similar file for ssh/remote logins - even though you're logging in as an existing user.

Here's a link I found on Red Hat's site for SSH - see if this helps:


linuxcool 04-09-2002 08:56 PM

Instead of 'su' try 'su -'. There's a space between the 'u' and the '-'.

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