Operating System - HP-UX
1832676 Members
2951 Online
110043 Solutions
New Discussion

Re: Issues with logging in - Hist file change reqd

 
SOLVED
Go to solution
Anil C. Sedha
Trusted Contributor

Issues with logging in - Hist file change reqd

Hi

I am facing issues with our NIS environment. I have rebooted two servers which host the home directories of all users. Also, one of them is the primary NIS server.

Now, when i change the HISTFILE location in the master "UNI.PROFILE" file to point to /tmp/.sh_history/username

it works fine. If i keep pointing to the user home directory which is being used through NIS the users are not able to login at all. Some users have to wait and then do a ctrl+c to work.

Can someone kindly suggest a resolution or some patches for this. Pls consider very urgent.

HP has not been able to come up with a solution yet since 3 days.

Regards,
Anil
If you need to learn, now is the best opportunity
4 REPLIES 4
S.K. Chan
Honored Contributor

Re: Issues with logging in - Hist file change reqd

In our environment, NIS users with their automounted home directories had never had the need to move .sh_history to a local directory. It remains in their mounted home directory. I have encountered the same problem you're having, a user when log in to a workstation would just wait and wait until ctrl-c is entered before he/she can get the prompt and in my case it's a NFS lock problem. What I did was clean up the rpc locks and restart rpc on both sides (the workstation and the server). You may want to try this to see if it helps. First you do this on the workstation side and then the server side. Do not worry as rpc is restarted any existing locks will be reclaimed, so this would not affect anyone.
1) Kill rpc.lockd and rpc.statd:
# kill `ps -ef|grep rpc.lockd|grep -v grep|awk '{print $2}'`
# kill `ps -ef|grep rpc.statd|grep -v grep|awk '{print $2}'`
===> Kill rpc.lockd and rpc.statd
2) Delete all files in /var/statmon.
# cd /var/statmon
# rm sm.bak
# rm state.bak
# mv sm sm.bak
===> The sm dir determines which hosts will reclaim its rpc lock.
# mv state state.bak
3) Restart rpc.statd and rpc.lockd
# /usr/sbin/rpc.statd
# /usr/sbin/rpc.lockd

Another situation I've seen is a corrupted .sh_history file. This can be resolve by "zeroing" the file. This might be of help to you too.
Anil C. Sedha
Trusted Contributor

Re: Issues with logging in - Hist file change reqd

Hi Chan,

Thanks for the suggestions. I will try to implement them. But i am having problems with a wider view. The problem is not occuring on just one server. I have 50 servers in my environment and it is happening on most of them. The NIS server is just one.

Can you please suggest how should i try to use your solution on all the servers.

Regards,
Anil ( I shall assign points to your helpful solutions once we are done.. thanks very much again for the gr8 help)
If you need to learn, now is the best opportunity
S.K. Chan
Honored Contributor
Solution

Re: Issues with logging in - Hist file change reqd

Try on one server first and one workstation that is having the problem. This (the rpc reset) is not something that need be done frequently if your system is running fine. If it works then the question remains how long before the problem comes back. Patch is certainly a possibility, as long as you got the latest NFS/NIS cumulative patch you should be ok. Is this a mixed OS environment ? (server 11.x, workstation 10.x/11.x).
Anil C. Sedha
Trusted Contributor

Re: Issues with logging in - Hist file change reqd

Thanks Chan..

You are one hell of a master on these issues.

I have seen a lot of your postings. All answers have been very technical and wonderful.

Double points to you for this.

I normally don't do this.. but you are worth it.

Cheers,
Anil
If you need to learn, now is the best opportunity