Root Login Auditing !!


 
Thread Tools Search this Thread
Operating Systems Solaris Root Login Auditing !!
# 1  
Old 07-25-2006
Root Login Auditing !!

Hi,

At our site(O.S Solaris 5.9) we have disabled the root login and also su . In place of this we have a root equivalent id eg:boss which is basically a copy of ur /usr/bin/su. Now in order to maintain an audit trail of the activities and to restrict root login we have enabled the access of this id only through 1 single id i.e rootload and enabled audit trail using the script command which has been added in the .profile at the very end as detailed below

### CODE START
#CHECK FOR ROOT LOGIN
a=`who -m|cut -c1-5`

if [ "$a" != 'rootload' ]
then
echo "SORRY ! YOU ARE NOT AUTHORISED TO LOGIN "
exit
else
script -a /home/rootload/rootlog/rootlog_`date +"DATE:%d%m%y_TIME:%H%M"`
fi
exit
## CODE END

Now I face 2 problems

i) If I logonto root just using command boss then the .profile does not execute and hence the root login restirctions and audit trail are not applicable.
ii) If I logon to root using boss - , then the .profile is executed and audit trail and root log audit trail are avalaible but when i exit out using exit command then the processes whihc are started with the root equivalent id are killed or exited out.

Please let me know if there are any solutions to overcome these 2 problems and still satisfy my requirements

Regds,
Jobby
# 2  
Old 07-26-2006
Quote:
Originally Posted by jobbyjoseph
i) If I logonto root just using command boss then the .profile does not execute and hence the root login restirctions and audit trail are not applicable.
That's a normal behaviour. If you don't use "-", the user profile won't be loaded, so your code won't be executed. You could "enclose" boss into a script that logs every execution of itself instead.

Quote:
ii) If I logon to root using boss - , then the .profile is executed and audit trail and root log audit trail are avalaible but when i exit out using exit command then the processes whihc are started with the root equivalent id are killed or exited out.
That's also usual. I would use "nohup" with those commands so that they're not finished when you logout.

One more thing. You may want to put the code inside /etc/profile instead, so that the user won't be able to change its profile and avoid your audit. You may also "trap" CTRL+C.

Regards.
# 3  
Old 03-07-2007
Quote:
Originally Posted by jobbyjoseph
At our site(O.S Solaris 5.9) we have disabled the root login and also su . In place of this we have a root equivalent id eg:boss which is basically a copy of ur /usr/bin/su. Now in order to maintain an audit trail of the activities and to restrict root login we have enabled the access of this id only through 1 single id i.e rootload and enabled audit trail using the script command which has been added in the .profile at the very end as detailed below
script is not a suitable auditing mechanism, you should use Solaris auditing instead. If you want to audit shell activity take a look at this page.
# 4  
Old 04-05-2007
The manual navigation is the only drawback I find in Unix--though it is the most secured OS IMO. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Su root or login root

Hi, I find there is some customized linux with application. When I use login account root and type the password. It is not allow to login. But if I login with specified user and password. Then I use command "su - " and type root passwd. It allow you to switch to "root" account . Or if i... (14 Replies)
Discussion started by: chuikingman
14 Replies

2. HP-UX

Hpsmh root can't login

On hp smh i can't login with root,i type correct unix password but said "ERROR: Username and password do not match" Tomcat,apache works and with debug enabled,nothing said on logs :( (2 Replies)
Discussion started by: Linusolaradm1
2 Replies

3. UNIX for Dummies Questions & Answers

Root Auditing Questions

First timer here... appreciate any help. My lingo might be off a bit, but ill clarify where necessary. 1- Is there a way to monitor direct logins to root? i.e. logging in directly to root as opposed logging in to a user account then su or sudo to root. i have a machine set to "permitrootlogin... (3 Replies)
Discussion started by: Mas000
3 Replies

4. UNIX for Dummies Questions & Answers

Only root can login using SFTP

Hello, It seems on a machine that I am responsible for supervising only root can use ssh/sftp services. I have looked at sshd_config and do not see anything that can fix this. PermitRootLoggin is enabled but that option does not preclude other users from using ssh/sftp services. When I try and... (5 Replies)
Discussion started by: mojoman
5 Replies

5. AIX

why I cannot login by root

I can use sudo su to root from my user id through ssh. Also can change root password. However, I cannnot login by root from ssh. Does any body know why? (10 Replies)
Discussion started by: rainbow_bean
10 Replies

6. HP-UX

Cannot login root

With my SSH, my HP-UX cannot login to root. It will come out a message su: unknown id: root. But I can login by user oracle. I also cannot login to console either by using root or oracle anymore. What shall I do. (5 Replies)
Discussion started by: surizan
5 Replies

7. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

8. AIX

root login

How do I make it so user "root" can not log directly into an AIX server? I want a user to be able to SU to it but not log into it to keep a log (2 Replies)
Discussion started by: breigner
2 Replies

9. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies

10. IP Networking

root login password

Hello Guys, We are using Sco Unix 5.0 While we was changing root password from scoadmin, It did not change the password and hang in between. Now, I am unable to login as root user pls. do suggest me how can i skip root password and how can i goto root to change the password again. Or if... (4 Replies)
Discussion started by: subho77
4 Replies
Login or Register to Ask a Question