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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-01-2007
maverixxx maverixxx is offline
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!!:
  #2 (permalink)  
Old 10-01-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
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" ?
  #3 (permalink)  
Old 11-11-2008
alif alif is offline
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
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 08:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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