Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when su - username / not going to specified directory.

SOLVED
Go to solution
D. Jackson_1
Honored Contributor

Problem when su - username / not going to specified directory.

Hello all -
Small problem that I am stuck with.
I am currently logged in as root under /(root), I issue a su - username it logs me in with this ID but when I issue a pwd as this ID I am currently in the /(root) filesystem and not my home destination. I cannot change out of this directory /(root) (which is okay).
This is giving us problems on two accounts.

Users configured with SAM and given a different location for home directory (/home/penac/outbound/executrack).
OS HP11.00
Can anyone help?

TIA
6 REPLIES
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Problem when su - username / not going to specified directory.

First of all, I'll assume that this is a local home directory and not an automounted NFS home directory. If that is the case then almost certainly theses users are missing permissions somewhere along the /home/xxx/yyy/zzz path. These uses must have at least r-x (search) permission down the tree to the home directory. The other thing that can cause seemingly strange behavior is very restrictive permissions on the mountpoints. You may need to unmount /home and lok at the permissions of that mountpoint. If any other directories in the path are actually mountpoints, look at them as well. This is almost certainly something that is trivial but not necessarily obvious.

Another thought is that these are NIS users and there is local definition in the /etc/passwd file that is overridding NIS.
If it ain't broke, I can fix that.
steven Burgess_2
Honored Contributor

Re: Problem when su - username / not going to specified directory.

Hi

Have you confirmed the settings of the $HOME env variable for the 2 users, what is the home directory set to in /etc/passwd

echo $HOME

Regards

Steve
take your time and think things through
MANOJ SRIVASTAVA
Honored Contributor

Re: Problem when su - username / not going to specified directory.

Hi D

This happens when either the home directory is not there or when the user doesnt have rwx permissions to acces the directory . If the home directory is ther then change the
permisions of the (/home/penac/outbound ) direcorty to rwx for all then you should be good to go.


Manoj Srivastava
S.K. Chan
Honored Contributor

Re: Problem when su - username / not going to specified directory.

Like what have been mentioned, it's probably due to NFS mount permission or local FS permission depending on where the home directory is coming from. You might want to run ..
# pwck
just to make sure password file is clean.
MANOJ SRIVASTAVA
Honored Contributor

Re: Problem when su - username / not going to specified directory.

Hi Di

Also check the length of the line in /etc/passwd I think try to reduce the comment field as the home diretory path is big.


Manoj Srivastava
D. Jackson_1
Honored Contributor

Re: Problem when su - username / not going to specified directory.

Hi all
You all gave the answers that I was looking for but I had to open a call to HP for assistance(the user needed this ASAP). It was very simple, but easily overlooked, permissions issue.
I tried to reward you all points based on your answers. I would have given 10, but how do you expect me to catch up? Only kiddin.

Thanks again, this place rocks!

dcj