The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 06:41 AM
Prompted for System Password during login BFLO HP-UX 2 12-06-2007 01:45 PM
Disablin login for system accounts veccinho Security 1 11-09-2007 05:32 AM
How to check the last login user were doing in the system raziayub SUN Solaris 1 04-04-2007 06:44 AM
Can Unix Co-Exist with Windows 9X on the same System? ms73eb UNIX for Dummies Questions & Answers 2 05-31-2001 10:51 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-18-2002
yls177
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
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.
  #2 (permalink)  
Old 11-18-2002
auswipe's Avatar
auswipe auswipe is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 535
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?
  #3 (permalink)  
Old 11-18-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

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???
  #4 (permalink)  
Old 11-19-2002
yls177
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
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
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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
Bits: 0 [Banking]
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
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0