1827218 Members
2144 Online
109716 Solutions
New Discussion

last command and vsftpd

 
Amy Musser
Occasional Contributor

last command and vsftpd

I am testing vsftpd and all seems fine with it except that I do not get login/logout information in the wtmp file and therefore when I use the last command it does not show when I have logged in using vsftpd.

I have enabled the SESSION_SUPPORT option in the config file and vsftpd was compiled with PAM support.
7 REPLIES 7
IT_2007
Honored Contributor

Re: last command and vsftpd

did you check syslog where ftp session information logged in.
Amy Musser
Occasional Contributor

Re: last command and vsftpd

Yes. It is logging to syslog, but I want the info to show up with the last command.
Pete Randall
Outstanding Contributor

Re: last command and vsftpd

Do you have local_enable and/or log_ftp_protocol set in vsftpd.conf? See:

http://vsftpd.beasts.org/vsftpd_conf.html


Pete

Pete
Pete Randall
Outstanding Contributor

Re: last command and vsftpd

Better yet, how about session_support?

" This controls whether vsftpd attempts to maintain sessions for logins. If vsftpd is maintaining sessions, it will try and update utmp and wtmp. It will also open a pam_session if using PAM to authenticate, and only close this upon logout. You may wish to disable this if you do not need session logging, and you wish to give vsftpd more opportunity to run with less processes and / or less privilege. NOTE - utmp and wtmp support is only provided with PAM enabled builds.

Default: NO
"


Pete

Pete
Peter Godron
Honored Contributor

Re: last command and vsftpd

Amy,
you are not trying to capture anonymous ftp sessions are you ? Because they will not be logged this way.
Jonathan Fife
Honored Contributor

Re: last command and vsftpd

What user is vsftpd running as? I admit I'm not terribly familiar with it, but it seems that in order to update wtmp it would need to have root or adm privs.
Decay is inherent in all compounded things. Strive on with diligence
Amy Musser
Occasional Contributor

Re: last command and vsftpd

Here is my vsftpd.conf file.

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=000
dirmessage_enable=YES
xferlog_enable=YES
syslog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/adm/syslog/xferlog
xferlog_std_format=YES
banner_file=/usr/local/etc/msgs/ftp.banner
chroot_list_enable=YES
chroot_local_user=YES
chroot_list_file=/etc/vsftpd.chroot_list
passwd_chroot_enable=YES
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=NO
force_local_logins_ssl=NO
ssl_sslv3=YES
ssl_sslv2=YES
ssl_tlsv1=YES
rsa_private_key_file=/opt/openssl/private/privkey.pem
ssl_ciphers=3DES
use_localtime=YES
userlist_enable=YES
session_support=YES
text_userdb_names=YES


I have vsftpd running from inetd.