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
/etc/utmp file does not get updated with boot up details jyoti_mil UNIX for Advanced & Expert Users 1 06-11-2007 07:41 AM
utmp files Carmen123 AIX 2 12-21-2006 09:55 AM
utmp ACCOUNTING thmnetwork High Level Programming 2 06-17-2005 08:16 AM
SCO utmp file scott_williams1 SCO 1 10-30-2003 07:45 AM
Error login user file utmp jernesto_diaz UNIX for Dummies Questions & Answers 3 09-06-2002 08:36 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 09-30-2007
Registered User
 

Join Date: Aug 2007
Posts: 1
Help Needed using utmp file!

Hi.

I am working on a small assignment where i need to extract the login information of currently logged in users in a Linux client-server environment.I am able to extract only the userID,IP/HOST name,TTY,device name,GID,PID and login time using the structure 'utmp'.Also when i am saving the inforamtion in a particular file the GID and PID columns are blank in the saved file.Can Anyone explain why?..

Also i want to also display the information about the last access time of a user.Can this be done??.

Please Help!!:
Reply With Quote
Forum Sponsor
  #2  
Old 10-01-2007
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,197
How exactly you are using utmp ? locate on my local Fedora produces :
Quote:
locate utmp
/usr/bin/utmpdump
/usr/include/utmp.h
/usr/include/utmpx.h
/usr/include/bits/utmp.h
/usr/include/bits/utmpx.h
/usr/sbin/dump-utmp
/usr/share/doc/vte-0.14.2/utmpwtmp.txt
/usr/share/dstat/dstat_utmp.py
/usr/share/dstat/dstat_utmp.pyc
/usr/share/man/en/man5/utmp.5.gz
/usr/share/man/man0p/utmpx.h.0p.gz
/usr/share/man/man3/utmpname.3.gz
/usr/share/man/man5/utmp.5.gz
/var/run/utmp
Which one you are using and how ? Why not use "finger" "last" "who" ?
Reply With Quote
  #3  
Old 1 Week Ago
Registered User
 

Join Date: Nov 2008
Posts: 8
Question

i also have problem like yours

i also want to get users list and their login time, but i can't use utmp,

i think you can use utmp, can't you?

would you like to show me the code use utmp to get the users name and etc?

thanx
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:18 AM.


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

Content Relevant URLs by vBSEO 3.2.0