The timestamp of the home-directory will only show the last modification of the directory, which is altered when an object within it (file, sub-directory, pipe etc.) is create/deleted/renamed etc. so just using ls -l ~someuser/ is unreliable.
Going forward, you could intercept the executable /usr/bin/useradd with your own script that writes to either a log file or the syslog. Looking for something that has already happened, you might get lucky if the operative used sudo and that will have been written to the syslog. Of course, it depends how long you keep your syslog.
We have intercepted the call to write logs and we also have a monthly reconciliation of new accounts against requests, so that narrows it down.
Unfortunately, being paranoid after an event does not mean that you can necessarily find the original action.
I hope that this helps,
Robin
Liverpool/Blackburn
UK
Last edited by rbatte1; 02-03-2014 at 12:31 PM..
Reason: Additional comment about "ls -l ~someuser" being unreliable
I renamed the executables for useradd, usermod, userdel, passwd, etc. to have suffix .supplied. I then created a script /usr/bin/audit_logger with the below:-
When hard-linked to replace the original names, this writes messages to the syslog and off to the remote syslog collector because we have an entry in /etc/syslog.conf (or /etc/rsyslog.conf)
I hope that this is useful. It's not too clever, and you will need to check that it is kept in place. It writes to the syslog with the logger command, but because this can be lost when it gets to your normal limits, we have a permanent log file locally too in /sec/auditlog.
As we have recently outsourced our user admin, this is invaluable to tracing what they are doing and why and can be audited to trace back to authorised requests. It's not our preference, but dictated by our parent company, yet we still retain the legal responsibility for the servers and the protection of the sensitive personal and financial data they contain.
The security admin staff are trapped in simple menus to keep them away from the command line.
We have this on AIX, HP-UX & RHEL. If you don't have ksh I'm sure that the conversion to bash will be pretty simple.
Hi
I am not familiar with the linux, but I was asked to create a file system on a LUN from the NetApp that was mapped to the linux server.
The server is runing:
uname -a
Linux localhost.localdomain 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
and now... (6 Replies)
We have quite a few Linux VMs running (several hundred). Some are running in VMware and some are running on Citrix XenServer.
I know that it is possible, for example, to go into vSphere and search for the host name. But there are times where it is not found for whatever reason and I want to log... (0 Replies)
Hi all,
When I added one user in in this group hhs_gl6 following message got generated.
-bash-3.00$ /usr/local/bin/sudo /usr/sbin/usermod -G hhs_gl6 vivek
UX: /usr/sbin/usermod: hhs_gl6 name should be all lower case or numeric.
However when I cheked the user in /etc/group file, the... (1 Reply)
Is anyone aware of a way of creating a local hosts file for a user?
Getting a change made to /etc/hosts by our administrators takes about 4 weeks and a ridiculous amount of form filling for such a simple task, so was hoping I could have a locally controlled one for my user.
Is such a thing... (0 Replies)
Hi,
I want to find the size of the files added to a folder after a certain date(say 1st of october), I know we can list the files which were created after a certain date , but is there anyway to find the total size of those files ? (3 Replies)
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like
user>
while I'd like it to be as
user@host>
It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Hi There,
How many user can be added to a unix single group. I need this for unix and solaris.
BRs
-----Post Update-----
I'm asking about secondary group and not primary group. All the users are having 8 character as their username.
value is set for getconf LINE_MAX is... (1 Reply)
HI,
what is the command to find the host name with IP address.
is possible to find the host name of other boxes( having their ip) from the same box (assuming telnet to other box is possible from this)
Regards,
Ananda (1 Reply)