logout command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers logout command
# 1  
Old 04-07-2004
logout command

hi all

The "last" command shows the last login time of the user. is there any command for last logout time.

as usual, replies are appreciated. thanks boys.

raguram R
# 2  
Old 04-07-2004
i have never heard of logout being captured.

possabily check the syslog facitilty?

just a thought....
you could write a wrapper for the commands "login" & "exit" that call the logger facility and pass an entry to syslogd.
# 3  
Old 04-07-2004
"last" also shows logout time.
# 4  
Old 04-07-2004
shows how much i know.

you hear that kids. bo dont know jack.

Code:
from the last command on solaris 8  box:
optimus_p  pts/1        10.40.11.138     Wed Apr  7 10:58 - 11:09  (00:10)

# 5  
Old 04-08-2004
my sco release 5 shows this

DEV|rram!last -n4
User Line Device PID Login time Elapsed Time Comments
rram p2 ttyp2 2271 Thu Apr 8 17:33 00:00 logged in
srikanth ftp ftp2263 2263 Thu Apr 8 17:18 00:00
kannan ftp ftp2258 2258 Thu Apr 8 17:16 00:00
rgopal ftp ftp2256 2256 Thu Apr 8 17:16 00:00

Raguram R
# 6  
Old 04-08-2004
Login. Wait 10 minutes. Logout. Log back in. Now what does "last" look like? Unless "logged in" appears in the comment, that session is logged out. In such a case, added the elapsed time to the login time to get the logout time.
# 7  
Old 04-09-2004
i don't want to apply any mathematics here. any other alternate??

raguram R
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Automatic logout

Hello, I have this issue on a new server I just built. It is a RHEL 6.7 build. I use VNC to connect to the server from my windows machine. When I login to the Server in morning using VNC I get this error: "Automatic logout, this session is configured to log out after a period of inactivity. I... (0 Replies)
Discussion started by: bitlord
0 Replies

2. UNIX for Dummies Questions & Answers

Session logout

hi, i want to make a session logout in c++/unix which will redirect the user to the login page if the user is idle for 5mins (1 Reply)
Discussion started by: anubhav sharma
1 Replies

3. Shell Programming and Scripting

Login, excute command, logout Script Help

Good Evening all, After spending the last week or so reading many posts I decided to register and join in. This is my first post on the forum so please forgive me as im new to this, Im after some help in throwing together a quick basic script without using expect to change the password on several... (4 Replies)
Discussion started by: mutley2202
4 Replies

4. HP-UX

How to logout

Hi I am using UNIX version. HP-UX HP-UNIX B.11.00 I am writing a script which on certain condition should logout of unix. But with exit command i am not able to get this.. Plz suggest how i should logout of the session directly. (9 Replies)
Discussion started by: manish.s
9 Replies

5. Ubuntu

Help with a logout scrpt

Hi, I'm new to Linux and this forums. I was working on a logout script and was wondering if anyone could help me out. What I'm trying to do is to delete the content of the ~/tmp/ directory and also to perform a check if any processes are currently running befor logout. this is what I have ... (1 Reply)
Discussion started by: zexin
1 Replies

6. Shell Programming and Scripting

session logout

hi, im executing one script i,e sh test.sh i want to log out the sessing after script execution. and i do't want to user command like this. sh test.sh ; exit can i exit the session with the use of script pl help (1 Reply)
Discussion started by: arvindng
1 Replies

7. Solaris

.logout

I want to execute script while exiting a session, to gather session details. How to implement this in Solaris 10 (3 Replies)
Discussion started by: sharif
3 Replies

8. UNIX for Dummies Questions & Answers

auto logout

How do I disable the auto logout for remote logins to a host (2 Replies)
Discussion started by: lethgowerboy
2 Replies

9. Shell Programming and Scripting

.logout help

We have an application that uses the csh shell as the default. We can not change this as when we upgrade it will change back to csh. We have several people that log in with this id. I would like to create a .logout exit script to audit what transactions were performed, termal, etc. Does... (3 Replies)
Discussion started by: 2dumb
3 Replies

10. UNIX for Dummies Questions & Answers

logout

Every time the ksh script completes I got message - logout. I don't want to see this message.... Can someone give me a clue Thanks in advance. ZAM SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Sun-Fire-880 (2 Replies)
Discussion started by: zam
2 Replies
Login or Register to Ask a Question