I want to know the details of user logins of my Gnu/Linux servers (RHEL7 and Ubuntu 16.04) e.g. who, from what IP, when. So what is the location of the log files, from which I can find the list of the users and details of the last 30 days.I also want to redirect these logs on another location (ftp://IP/logindetails). So please guide me, How can I make it possible?
What is location of user login logs?
ubuntu;rhel;logs;login
The logs themselves vary by distro but are usually found in /var/log/. Examples/var/log/utmp, /var/log/btmp, /var/log/wtmp /var/log/secureAmong those, utmp shows system information and status as well as terminal logins.btmp shows failed logins. /var/log/faillog may have this as well/var/log/auth shows PAM summaries, including authentication and login.See utmp on Wikipedia for more information.See AskUbuntu - How to See Login History?For copying, you can use ftp to transfer the files, or you could directly copy them over using scp or rsync