Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

w 1

Status
Not open for further replies.

fluid11

IS-IT--Management
Jan 22, 2002
1,627
US
I'm running Proftpd on a Red Hat 7.2 box. How come when users are logged into the FTP server, the w or finger commands don't show the users logged in? I can only see them with the ftpwho command.

Thanks,
Chris
 
Thanks, but its not working. Does it matter where I put the entry in the file? I did restart the Proftpd daemon.

Here's my config...

ServerName "Server"
ServerType standalone
DefaultServer on
Port 21
Umask 027
MaxInstances 10
User user
Group proftpd
DisplayLogin ./readme.txt
DefaultRoot /ftp
CDPath /ftp
CDPath ~
AllowOverwrite on
ExtendedLog ./.ftplog read,write
WtmpLog on



Thanks,
Chris
 
What happens if you type:

'last'

Does the logged in user show up? It works for me, and your config file looks ok. 'w' does not show the user logged in, so sorry for giving you some false hope. I think this is because 'w' reads utmp, where 'last' reads wtmp. It looks like proftpd does not log to utmp, so you can always write a script, combining the two commands to show who is on your system. Bruce Garlock
bruceg@tiac.net
 
The "last" command shows this below. The current logged in user does show up along with everyone who logged in via FTP.

root pts/0 it.domain.com Fri Mar 29 08:07 still logged in
user1 ftpdxxxx it.domain.com Thu Mar 28 14:52 - 14:52 (00:00)
etc....


Thanks for your help.
 
If I do a "cat /var/log/wtmp" or "cat /var/run/utmp" it just shows me a big mess. I'm connecting to the Linux box via PuTTY from a Windows machine.

The wtmp file shows stuff like this...

uTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYP
uTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY6cPuTTYPuTTYPuTTYPuTTYPuTT
YPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTT
YPuTTY6c6cPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY
PuTTYPuTTYPuTTYPuTTYPuTTY6cPuTTY6c6c6c6cPuTTYPuTTYPuTTY:

The utmp file shows something similar. Is this normal?

Thanks.
 
Yes. Utmp amd wtmp aren't text files.

See man utmp for their structure. Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Thanks for your posts. I think I'll just use "last | head" to see who is currently logged in. That will work fine. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top