The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how do you login as sms-svc on a system controller vinix SUN Solaris 1 02-04-2008 02:41 AM
Prompted for System Password during login BFLO HP-UX 2 12-06-2007 09:45 AM
Disablin login for system accounts veccinho Security 1 11-09-2007 01:32 AM
How to check the last login user were doing in the system raziayub SUN Solaris 1 04-04-2007 03:44 AM
Can Unix Co-Exist with Windows 9X on the same System? ms73eb UNIX for Dummies Questions & Answers 2 05-31-2001 07:51 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-2002
yls177
Guest
 

Posts: n/a
past login still exist in the system

hi, i noticed that there are still past logins which have not been terminated. how should i removed them?
i am on aix.
Forum Sponsor
  #2 (permalink)  
Old 11-18-2002
auswipe's Avatar
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
Re: past login still exist in the system

Quote:
Originally posted by yls177
hi, i noticed that there are still past logins which have not been terminated. how should i removed them?
i am on aix.
Depends on the operating system.

On some OSs you could go and removed the offending entries from the /etc/passwd and/or /etc/shadow and /etc/groups.

Under FreeBSD, you can use vipw to remove entries (FreeBSD also uses a /etc/master.passwd instead of /etc/shadow).

Have you verified that none of these accounts are used for cron-jobs or suid's?
__________________
Not quite as cool as all the other Kids...
  #3 (permalink)  
Old 11-18-2002
Kelam_Magnus's Avatar
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Auswipe, I believe they are talking about ids that show up when you do a who -a that are "old".

I see this on my systems as well. With who -q, I have 6 users logged in, but my who -a shows many other ids that are latent. Folks who are not logged in, but have been in the past.

Here are a few examples of what I think he is talking about.

user 1 pts/13 Oct 28 15:14 old 24395 id= 13 term=0 exit=0
user2 ttyp3 Nov 11 16:44 old 5342 id= p3 term=0 exit=0


Is that what you are talking about yls177???
__________________
My brain is your brain
  #4 (permalink)  
Old 11-18-2002
yls177
Guest
 

Posts: n/a
do a who -u and u get a list of users.. the dates are displayed as well. now, how to explain those entries whose dates are far way back?

thanks
  #5 (permalink)  
Old 11-19-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
In the old days, we had directly attached dumb terminals that we used. A program called getty would initialize the port, print a login prompt and read a login name. If that read ever succeded, it would exec login which would get your password and then then exec your shell. When your shell exited, init would notice and respawn a new getty.

The getty program would clear out a utmp entry. The login program would put the user's info in the utmp entry.

So you never had these leftovers. If the system rebooted or if if your shell died, a new getty would come along and clear out the utmp entry.

Then came networks. Now we have telnetd (or something similiar) that creates the utmp entry and then forks and exec's login. The telnetd, besides handling the communication, is waiting for the shell to exit. When it does, telnetd will clear out that utmp entry.

But if the telnetd is killed with -9 or if the system reboots unexpectedly with users still logged in, the entry in utmp persists. Eventually, the pty will be re-used and entry re-used as well. But in the meantime the old entries continue to show up in "who".

You could clear the file out at reboot time if it really bothers you. I see it as a resource. Each such entry is evidence of something that went wrong.
  #6 (permalink)  
Old 11-19-2002
yls177
Guest
 

Posts: n/a
are there any alternatives besides rebooting?

wow, i am impressed by your knowledge of unix... especially.. " in the old days"

am sure that will have a great time learning from you and many of the others..

cheers
  #7 (permalink)  
Old 11-20-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
The only alternative that would be safe would be to write a utility to clean them out.

I *think* that it might be possible to use fwtmp to fix this, but it wasn't intended for that and you would somehow need to prohibit logons and logoffs during the process.
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0