Visit Our UNIX and Linux User Community


past login still exist in the system


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers past login still exist in the system
# 1  
Old 11-18-2002
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.
yls177
# 2  
Old 11-18-2002
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  
Old 11-18-2002
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  
Old 11-19-2002
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
yls177
# 5  
Old 11-19-2002
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  
Old 11-19-2002
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
yls177
# 7  
Old 11-20-2002
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.
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #602
Difficulty: Medium
MySQL 8.0 incorporates a transactional data dictionary that stores information about database objects.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Finding system uptime without login

Hi, Am writing a script where I want to find uptime of certain servers. Is there any command where we can find uptime without login to the server, since the server list is big logging to the server will time consuming. Thanks in advance (7 Replies)
Discussion started by: rogerben
7 Replies

2. Programming

C++ Login System help.

I'm new to C++. I have a text file named idpw.txt which is storing id and password e.g admin password account1 abc john hello Here's my code so far: bool login() { string user,password, user1, password1; ifstream myfile("idpw.txt"); cout << "Please enter your username" <<... (3 Replies)
Discussion started by: andylbh
3 Replies

3. Shell Programming and Scripting

Want to find the stdout for the partiuclar user login for past 12 hrs.

Want to find the stdout for the partiuclar user login for past 12 hrs. Say for eg : user login id is teladm And the host name is sys22prod I want to see the stdout for that user id in that host for past 12 hrs (1 Reply)
Discussion started by: mail2sant
1 Replies

4. AIX

Hanging in the system after login !

Guy's I have AIX 6.1 has some slowness when I login to the system .. When I login by user screen hangs for some time 20 seconds then it's give me the command prompt .. ! system is fine is working fine only this issue I faced can you please help me in this .. what's the expected reason... (2 Replies)
Discussion started by: ITHelper
2 Replies

5. Solaris

NTP force system time in the past

Hello I have a question that may sound stupid after and maybe it is. We are syncing our sytem time via ntp from a reference time server. all works quite well but due to a mall applikation which not accepts timestamps from our servers that in the future, and if it even was 1 ms, we have to... (1 Reply)
Discussion started by: demwz
1 Replies

6. UNIX for Advanced & Expert Users

system not login

Hi, I was add my shell script in /etc/rc.d/rc.local file Eg. sh /root/KernelModule.sh my KernelModule.sh contain insmod xxxxx.ko insmod yyyy.ko I have insmod 22 kernelmodule in this script , all the modules are my own driver modules. now problem is my system is booting but... (2 Replies)
Discussion started by: rajamohan
2 Replies

7. HP-UX

Prompted for System Password during login

Hello, I'm new to HP-UX. I have a system running B.11.23 on ia64. The system gets its user passwords via active directory. Everytime a new account is added to AD a script pushes out the account info to all the systems and this system is updated too. However, on this machine, users are unable to... (2 Replies)
Discussion started by: BFLO
2 Replies

8. Cybersecurity

Disablin login for system accounts

Hy everyone! I'm trying to lock out system accounts on my Tru64 UNIX machines. Wherever I look, it says only to put Nologin or *Nologin in password field of desired account in /etc/passwd. But it doesn't work. I still can su to that accounts. There are some accounts that already have Nologin... (1 Reply)
Discussion started by: veccinho
1 Replies

9. Solaris

How to check the last login user were doing in the system

Hi, I'm new to solaris/ Unix and would like to know how to check in the system what was the last login user were doing. Is there any way to check this? Thanks in advanced. (1 Reply)
Discussion started by: raziayub
1 Replies

10. UNIX for Dummies Questions & Answers

Can Unix Co-Exist with Windows 9X on the same System?

Is it possible to install unix on a system which already runs windows 98? (2 Replies)
Discussion started by: ms73eb
2 Replies

Featured Tech Videos