Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Security
Reload this Page How to find out when a user account is created?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Security Discussion about keeping your machines secure, and the crackers out.

Reply
 
Thread Tools Display Modes
Old 05-16-2008   #1 (permalink)
rizi
Just Joined!
 
Join Date: May 2008
Posts: 7
How to find out when a user account is created?

Hi all,

I had asked this question in another thread but there was no response. Since the question was unrelated to the topic of that thread, I gathered that many people might have missed the question. The question is this - How do I find out when a user account is created? /etc/shadow file contains information on when the password was last modified for an account but I could not see any information on how to find out when a unix/linux user account was created.

TIA
rizi
rizi is offline   Reply With Quote
Old 05-16-2008   #2 (permalink)
Lakshmipathi
Linux User
 
Lakshmipathi's Avatar
 
Join Date: Sep 2006
Location: 3rd rock from sun
Posts: 492
Exclamation

Interesting ...I'm not sure about this...some hints that might help you explore

/var/log/wtmp will have login records ..Is possible to grap user's first entry from this ...can we get a date of login....again here we can't assure first login will remain same as account created date ....

Hope someone will have easy answer for this ...
__________________
- LakshmiPathi.G
------------------------------
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
------------------------------
My OpenSource Projects:
giis
exthide
ext3crave
Lakshmipathi is offline   Reply With Quote
Old 05-19-2008   #3 (permalink)
secondmouse
Just Joined!
 
Join Date: May 2008
Posts: 21
try
passwd -S username
secondmouse is offline   Reply With Quote
Old 05-19-2008   #4 (permalink)
rizi
Just Joined!
 
Join Date: May 2008
Posts: 7
Lakshmipathi and secondmouse - thanks for your responses!

/var/log/wtmp suggestion is excellent to find the last time the user entered the system but as you have pointed out yourself - the user may not log in the same day the account is created. In my system, they rarely login at all - so I cannot take that date as the date of last login.

passwd -S prints out a status of the password of the user - the date in the output is the date the password was last changed. So, yes it does give me the date when the user was created but when the password changes the user's creation date is no longer stored
rizi is offline   Reply With Quote
Old 05-20-2008   #5 (permalink)
Lakshmipathi
Linux User
 
Lakshmipathi's Avatar
 
Join Date: Sep 2006
Location: 3rd rock from sun
Posts: 492
Exclamation

One more suggestion but again not reliable one.
Checkout the created date of .bash_profile file of the user.
[If the file is not modified or edited by user ..we got the desired date - Someone correct me if i'm wrong]
May be you can combine the .bash_profile created date and /var/log/wtmp
file content and passwd option and trace something out it
__________________
- LakshmiPathi.G
------------------------------
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
------------------------------
My OpenSource Projects:
giis
exthide
ext3crave
Lakshmipathi is offline   Reply With Quote
Old 05-30-2008   #6 (permalink)
i92guboj
Linux Engineer
 
Join Date: Nov 2007
Location: Córdoba (Spain)
Posts: 886
I wonder why are you so concerned about this. If you are root you should be the one creating the accounts so you shouldn't need any notice.

Still, you can use inotifywait, from inotify-tools (assuming that your kernel is recent enough to support inotify).

inotify-tools

With that tool you can monitor many events on a given point of your filesystem (i.e. /home) like creation of files/dirs for example. Of course, this will only work if you system is configured to create the home dir at the same time that the account is created.

If not, you could still use inotifywait to monitor /etc/passwd for modification.
i92guboj is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 10:46 PM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0