- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- telnet login failure - related to .sh_history file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 04:16 AM
01-20-2004 04:16 AM
telnet login failure - related to .sh_history file
I have a rather funny situation that I can't seem to figure out. When I try to telnet in as a particular user, I get a "connection closed" error. There are no core files created from this event in the users home directory. My workaround is I have to log in as root, cd to the user's home directory that has the login issues, move the .sh_history file to be a backup file, touch a new .sh_history file under the users directory, chown to that user:group and then make the .sh_history file have the correct permissions. This happens very sporatically. What's wierd is I can telnet in as root and su to that user as long as I don't use the "-" option (su dwsuser, instead of su - dwsuser). If I use the "-" option, I get the same connection closed error. Also, I'm not sure if this is related, but the only core file that appears close to the same time is from the dced daemon. I'm not sure what that does or if it somehow impacts the .sh_history file. About the system, we are running HP-UX 11.0, base version (no quality packs). The bad .sh_history files have been ranging from 3K to 10K. I'm wondering if anyone has come across this issue? I know that the .sh_history file should be trimmed at 4K, but it doesn't seem like it's a file size that's the issue because the file size is so inconsistent when the failed telnet occurs. As a side note, it's only happening for one user. All other users can telnet into the box. The infected user performs a lot of operations with the system and oracle. And, last but not least, if, after I do my workaround from above, I put the old, "corrupted" .sh_history file back and telnet into the box again....it works fine.
Anywho, if anyone needs additional information, please let me know.
Thanks,
Jef
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 04:25 AM
01-20-2004 04:25 AM
Re: telnet login failure - related to .sh_history file
I think this was more with the connection hanging.
We introduced the folowing change in /etc/profile.
You can customise for your specific needs (and/or user !) :
# -- clear history file
if [ -w ~/.sh_history ]
then
> ~/.sh_history
fi
Rgds,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 04:28 AM
01-20-2004 04:28 AM
Re: telnet login failure - related to .sh_history file
You can null out .sh_history file in users's profile. Post the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 05:11 AM
01-20-2004 05:11 AM
Re: telnet login failure - related to .sh_history file
Yeah, I looked into zeroing out the .sh_history file as an optional workaround, but it's just sooooooo frustrating not being able to track down why this is doing this. Thanks for the idea. I'm actually going to implement that workaround while I try to figure out what is really going on with this thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2004 08:09 AM
01-21-2004 08:09 AM
Re: telnet login failure - related to .sh_history file
From the su man page:
If the - option is specified, the new shell starts up as if the new
user had initiated a new login session. Exceptions are as follows:
+ The HOME variable is reset to the new user's home directory.
+ If the new user name is root, the path and prompt variables are
reset:
PATH=/usr/bin:/usr/sbin:/sbin
PS1=#
For other user names:
PATH=/usr/bin
PS1=$
+ The TERM variable is retained.
+ The rest of the environment is deleted and reset to the login
state. However, the login files are normally executed anyway,
usually restoring the expected value of PATH and other variables.
Check the .profile and the .kshrc etc. in your user's home directory. Is there anything else weird going on in there? If you create a test user and copy over the contents of your user's home directory do you get the same error? Because it doesn't happen when you omit the '-' option, the answer MUST lie somewhere in the users config files.
Something else you could try is to set the history file to something else and see if that has any impact.
Regards,
Myles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2004 08:16 AM
01-21-2004 08:16 AM
Re: telnet login failure - related to .sh_history file
I rarely have problems with users, but I sometimes remove them and recreate them.
mv any data to /tmp and cp it back when you recreate them.
I would look at what env variables they have set and I would look at replacing their .profile and other .files to clear out any corruption.
--------------------------------------------
I also agree that if you, as root, su - to the user will overwrite their variables and set them to yours as root, BUT as they login it should re-read the /etc/profile and reset their env variables.