- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SU to Root gives me wrong user in SULOG!
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
07-09-2003 03:20 AM
07-09-2003 03:20 AM
SU to Root gives me wrong user in SULOG!
Logged in as myself gives me another username in the SULOG whenever i perform "su - root".
And this only happens when i'm using "pts/1".
Anyone any idea what's happening here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 03:25 AM
07-09-2003 03:25 AM
Re: SU to Root gives me wrong user in SULOG!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 03:26 AM
07-09-2003 03:26 AM
Re: SU to Root gives me wrong user in SULOG!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 03:31 AM
07-09-2003 03:31 AM
Re: SU to Root gives me wrong user in SULOG!
/usr/lib/acct/fwtmp < /etc/utmp | grep pts/1
Or you can use:
/usr/lib/acct/fwtmp < /etc/utmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 03:34 AM
07-09-2003 03:34 AM
Re: SU to Root gives me wrong user in SULOG!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 03:42 AM
07-09-2003 03:42 AM
Re: SU to Root gives me wrong user in SULOG!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 03:47 AM
07-09-2003 03:47 AM
Re: SU to Root gives me wrong user in SULOG!
grpck
There may be a consistency problem in /etc/passwd
By chance have we tranferred some users?
rmsf the psuedo terminal
insf -e
This should help.
Back the system up first.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 04:26 AM
07-09-2003 04:26 AM
Re: SU to Root gives me wrong user in SULOG!
Thanx all for youre reply's.....
Pete Randall:
Just an "su" is enough to reproduce this.
Cheryl:
I use xterm to connect to system.
utmp and wtmp looks fine. information in
these files looks correct.
Manikandan:
We don't have this patch installed. Info
about this patch does not imply solving
this issue.
I had allready been looking for messeges
about this issue. Have seen some of it, but
didn't find any solutions.
For now, rebooting is not an option.
Steven E. Potter:
did: rmsf /dev/pts/1
did: insf -e
Problem still not solved.
How can i check wether i have consistency
problem in /etc/passwd or /etc/group?
Looking in it, the information seems to be
correct. What should i be looking for?
---------------------------------------------
Does not matter what user is logged on pts/1. As soon as you do su, problem pops up.
It also does not matter TO what user you su!!
Gr.
Anand Bhairosingh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 04:38 AM
07-09-2003 04:38 AM
Re: SU to Root gives me wrong user in SULOG!
getlogin(), if getlogin() fails it is found by getpwuid(getuid()).
In turn getlogin() ultimately finds the user by checking the
/etc/utmpx file for the control tty associated with the current
session leader process (check man getlogin and getutx).
I guess that utmpx could be corrupt, hence getlogin returns an old or invalid entry.
could try zeroing both utmp/utmpx with
cat /dev/null > /etc/utmpx
cat /dev/null > /etc/utmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 04:48 AM
07-09-2003 04:48 AM
Re: SU to Root gives me wrong user in SULOG!
What about users that are loggen in at this moment?
Can i just clean those files without cuasing any onther problems?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 04:57 AM
07-09-2003 04:57 AM
Re: SU to Root gives me wrong user in SULOG!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 06:46 AM
07-09-2003 06:46 AM
Re: SU to Root gives me wrong user in SULOG!
Thanx for your support.
doing cat /dev/null on utmp, utmpx, wtmp and wtmpx solved my problem.
Just did it while being "UP" (so didn't go to single user mode as advised and didn't reboot the system).
Thanx Alex.
Gr.
Anand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 08:10 AM
07-09-2003 08:10 AM
Re: SU to Root gives me wrong user in SULOG!
I think Alex is correct i.e. you have/had a corrupt utmpx file. We ran into the same thing.
You should look at & probably apply PHNE_24829 as this problem is liable to pop up again.
Here's one of the symptoms from it's info page:
SR 8606220839 / CR JAGad89975
3. Incorrect records might be written into /etc/utmpx
by telnetd when it exits.
Pay careful attention to the special instructions for this patch.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2003 08:14 AM
07-09-2003 08:14 AM
Re: SU to Root gives me wrong user in SULOG!
grpck checks the /etc/groups file for problems
I think the patch is your solution though.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com