Operating System - HP-UX
1832941 Members
2792 Online
110048 Solutions
New Discussion

NIS users not getting the shell

 
SOLVED
Go to solution
Ravi_8
Honored Contributor

NIS users not getting the shell

Hi, all
D-380 running 10.2 is a NIS client, executes all NIS commands, but when NIS user logged in profile file will be executed but does give the shell, it just hangs.nisswitch,passwd file are correct. if anybody knows solution pls respond.

ravi
never give up
15 REPLIES 15
Alex Glennie
Honored Contributor

Re: NIS users not getting the shell

Sounds like it's shell related ....have you tried changing it checking in /etc/shells ... OR ...

Is the users $HOME NFS mounted too and this is the problem of the histfile needing to be local ?
Santosh Nair_1
Honored Contributor

Re: NIS users not getting the shell

Don't know if you already tried this, but try setting HISTFILE to any non-NFS mounted filesystem. I know there was an issue with NFS home directories, KSH and the HISTFILE environment variable. In /etc/profile, set HISTFILE=/tmp/.sh_history.$LOGNAME.$$.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Ravi_8
Honored Contributor

Re: NIS users not getting the shell

Hi, alex

Yes the users HOME dir is NFS mounted. it's working fine in all machines except this machine. configs of all files in all the machines are similar
never give up
Ravi_8
Honored Contributor

Re: NIS users not getting the shell

Hi, santosh
I tried your solution before posting this problem. it's not working still
never give up
Santosh Nair_1
Honored Contributor

Re: NIS users not getting the shell

What happens if you hit control-c during the point where the shell hangs...does it give you a prompt? Also, try adding set -x to the top of a user's profile to determine where the shell hangs. Finally, I'm assume that there is no mount problems, i.e. this machine has no problems mounting the users' home directory(?).

-Santosh
Life is what's happening while you're busy making other plans
Ravi_8
Honored Contributor

Re: NIS users not getting the shell

Hi,
set -x in users profile file.
when logged in, profile will be executed till the end. ctrl+c,ctrl+d,ctrl+break nothing is giving us the shell.when rebooted system is NFS mounting all filesystems.
never give up
Alex Glennie
Honored Contributor

Re: NIS users not getting the shell

You could try editting /etc/rc.config.d/nfsconf and adding the following :

LOCKD_OPTIONS="-p 4045"

you *may* get an improvement ?
Ravi_8
Honored Contributor

Re: NIS users not getting the shell

Hi,
commenting NFS filesystems in /etc/fstab and after reboot the NIS user can login , but home dir will not changed to user home dir since NFS filesystems are not mounted. If I mounted NFS filesystem users can't login.

any solutions
never give up
G. Vrijhoeven
Honored Contributor

Re: NIS users not getting the shell

hi ravi,

whitch mount options do you use?
export machine should be ok since you can mount on other systems but client options?
( fstab entry eg.)
machine:dir /dir nfs hard,intr,bg,retry=10 0 0
A. Clay Stephenson
Acclaimed Contributor

Re: NIS users not getting the shell

This certainly sounds like a problem with the automounter. Since you indicate that hard mount NFS filesystems are ok, I would investigate the problem like this.

1) Stop the automounter
2) Remove any entries in tmp_mnt
3) Restart the automounter
4) As root (who I assume does not have an automounted home directory), try something like ls /home/user1. This will confirm that the automounter is working.
5) As a regular user (you may need to alter/ create a user that does not have an automounted home directory), repeat step 4. I assume that this user would at least have read permission on /home/user1.

This should help you narrow down the problem.
If it ain't broke, I can fix that.
Sachin Patel
Honored Contributor

Re: NIS users not getting the shell

Clay,
I think he is using hard mount not automount nfs because he says he has remove enty from /etc/fstab.

Can it be permission problem?

Sachin
Is photography a hobby or another way to spend $
A. Clay Stephenson
Acclaimed Contributor

Re: NIS users not getting the shell

You may be right Sachin. I can actually read this two ways. I think he is saying that he has both hard mounted NFS directories and automounted home directories. I mean if you are running NIS, why aren't you using the automounter especially for home directories?

If it it hard mounted home directories then I would definitely check the permissions of the mountpoint(s).

If it ain't broke, I can fix that.
Sachin Patel
Honored Contributor

Re: NIS users not getting the shell

Clay,
That is true. I would also like to see automount use if you are using nis and everyones home is on nfs.
When I start working here they had many filesystems hard mount all over the places. Finally two years ago we have start using automount. Still no one want to mess with automount.
If anything in question about automounter they ask me to take a look. I am not expert but I think If I mess it up what can maximum happens (Fireeeeeee) they are not going to kill me.

Sachin
Is photography a hobby or another way to spend $
Santosh Nair_1
Honored Contributor

Re: NIS users not getting the shell

Check that mountpoint and home directory has execute permissions. This could explain why the user isn't able to go into his home directory.

-Santosh
Life is what's happening while you're busy making other plans
Brian Hackley
Honored Contributor
Solution

Re: NIS users not getting the shell

Ravi,

Not sure if you already solved this one or not.
First determine if the problem is Automount, or NFS. You can do this by stopping automount and umounting the NFS mount for the user home directory, and then NFS mount from the command line.
Then test the NFS mount e.g. as root, can you cd and ls files, etc. If that fails, you have an NFS filesystem problem to debug against that NFS Server. Do all users mount from the same NFS Server, or from several different ones?
If they mount from differnet NFS Servers, test each one out as above.
If the NFS mount works as root, then you probably have a file locking problem w/ the NFS Server in question. Go to that NFS Server and kill rpc.statd and rpc.lockd. Then remove any entry for the failing NFS client(s) in /var/statmon/sm and sm.bak. Restart rpc.statd and rpc.lockd and see if the users can now work. If not, repeat the same procedure of clearing the status monitor directories and restarting rpc.statd and rpc.lockd on all the NFS clients.

If the above STILL fails,export the user HISTFILE to /tmp/.sh_history_$LOGNAME and test again...

I hope this helps get the problem resolved.

-> Brian Hackley
Ask me about telecommuting!