LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2009, 09:57 AM   #1
mrblacksmith
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Rep: Reputation: 0
List successful logins for deleted users [SOLVED]


Hi,

I want to see a log over successful logins on my Suse 10 machine and just discovered the lastlog command. It gives me the information I want (last time a specific user logged in to the machine), but unfortunately only for current users on the system. I just deleted a user from the machine (using YaST) and now I cannot see him using lastlog (I guess I should only have inactivated it?).

So, what to do? Is there some other log for login attempts (successful most interresting for me), or can I recover/undelete/restore a user some how? I have not deleted the home directory if that's got anything to do with this...

Thanks!

Last edited by mrblacksmith; 02-16-2009 at 01:44 AM. Reason: change header to indicate solved
 
Old 02-13-2009, 10:45 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by mrblacksmith View Post
Hi,

I want to see a log over successful logins on my Suse 10 machine and just discovered the lastlog command. It gives me the information I want (last time a specific user logged in to the machine), but unfortunately only for current users on the system. I just deleted a user from the machine (using YaST) and now I cannot see him using lastlog (I guess I should only have inactivated it?).

So, what to do? Is there some other log for login attempts (successful most interresting for me), or can I recover/undelete/restore a user some how? I have not deleted the home directory if that's got anything to do with this...

Thanks!
Well, if you've deleted the user, and you didn't mean to, you're going to have to recreate the user.

If you delete a user, they're obviously not active anymore, and won't be able to log in with that ID. You can check auth.log, or your syslogs, and see if there are any ATTEMPTS to log in with that ID, but that'll depend on what level of logging you have set up.

Just rebuild your user, and you should be ok.
 
Old 02-16-2009, 01:43 AM   #3
mrblacksmith
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Original Poster
Rep: Reputation: 0
I found another command, "last" which I ran in "/var/log" as root. This gave me the list I wanted, and included all logins for all users for the last months. It included logins by users not available in the system anymore (i.e. not only current users as "lastlog" did), so I do no need to restore/rebuild any users. Thanks anyway!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possbile to sync active directory users with proftpd logins? element247 Linux - Networking 2 01-29-2009 07:29 AM
We need FAQ and List of successful PC/Laptops tsuren Zenwalk 2 01-13-2007 08:40 PM
setting umask for all users and all sorts of logins sterrenkijker Debian 3 01-01-2006 05:19 AM
[RHL 9.0] - Deleted all users, now I can't log in - PLEASE HELP! Fat_N_Furry Linux - General 3 08-01-2003 08:48 PM
SSH logins and limiting remote users login rights. redgore Linux - Networking 2 07-16-2002 03:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration