<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I want to get a mail whenever a user is using &amp;quot;su -&amp;quot; to get root access. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425375#M354906</link>
    <description>Hi Basheer.&lt;BR /&gt;&lt;BR /&gt;Pls give your full script.</description>
    <pubDate>Sun, 24 May 2009 10:08:44 GMT</pubDate>
    <dc:creator>senthil_kumar_1</dc:creator>
    <dc:date>2009-05-24T10:08:44Z</dc:date>
    <item>
      <title>I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425369#M354900</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt; There five Unix admins are working in my company. so i want to monitor which user is using root access at which time.&lt;BR /&gt;&lt;BR /&gt; so i want to send a mail automatically whenever a user is using "su -" to get the root access.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; is it posibble.&lt;BR /&gt;</description>
      <pubDate>Sat, 23 May 2009 17:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425369#M354900</guid>
      <dc:creator>senthil_kumar_1</dc:creator>
      <dc:date>2009-05-23T17:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425370#M354901</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;You could add the following to the end of your 'root' .profile.  It will mail the 'root' account a message indicating an 'su' to the root account.  You can change the mail address to be yourself if you wish.&lt;BR /&gt;&lt;BR /&gt;WHO=$(whoami|awk '{print $1}')&lt;BR /&gt;[ "$(logname)" != "${WHO}" ] &amp;amp;&amp;amp; \&lt;BR /&gt;    echo "$(logname) has 'su'ed to 'root'"|mailx -s "NEW ROOT USER!" root&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Of course, the '/var/adm/sulog' file will show you successful and unsuccessful 'su' events, too.  This is the standard place to look for a history of these transitions.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Sat, 23 May 2009 19:45:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425370#M354901</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-05-23T19:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425371#M354902</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;a lot of possible ways are there. Some of them using monitoring programs like ovo, nagios. or you can use a script to monitor /var/adm/sulog and mail when su to root is reliased. &lt;BR /&gt;&lt;BR /&gt;Sample script:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;tail -f /var/adm/sulog |&lt;BR /&gt; while read line&lt;BR /&gt; do&lt;BR /&gt;   case "$line" in&lt;BR /&gt;    *root*) printf "%s\n" "$line" |mailx -s "switch to root" user@domain.com&lt;BR /&gt;        ;;&lt;BR /&gt;   esac&lt;BR /&gt; done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kenan.&lt;BR /&gt;</description>
      <pubDate>Sat, 23 May 2009 19:53:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425371#M354902</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2009-05-23T19:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425372#M354903</link>
      <description>&amp;gt;whenever a user is using "su -" to get the root access.&lt;BR /&gt;&lt;BR /&gt;Do you care if the user leaves out the "-"?  In that case JRF's suggestion won't work.</description>
      <pubDate>Sat, 23 May 2009 21:39:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425372#M354903</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-05-23T21:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425373#M354904</link>
      <description>It sounds like you are having problems with root users making mistakes or violating security requirements. Start by verifying that there are no duplicate root users (possible root kit):&lt;BR /&gt; &lt;BR /&gt;# logins -d&lt;BR /&gt; &lt;BR /&gt;Then write a script that monitors /var/adm/sulog looking fir new entries.&lt;BR /&gt; &lt;BR /&gt;Make sure that root's .profile has .sh_history enabled with HISTFILE=$HOME/.sh_history and a long HISTSIZE:&lt;BR /&gt; &lt;BR /&gt;export HISTFILE=$HOME/.sh_history&lt;BR /&gt;export HISTSIZE=5000&lt;BR /&gt; &lt;BR /&gt;Make copies of root's .sh_history in a secure location, perhaps on another computer.&lt;BR /&gt; &lt;BR /&gt;Finally, all sysadmins must not use root to perform non-root tasks. A better choice is to use sudo which restricts the commands and parameters for privileged users. And of soures, everything is logged.</description>
      <pubDate>Sat, 23 May 2009 23:42:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425373#M354904</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-05-23T23:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425374#M354905</link>
      <description>Kumar,&lt;BR /&gt;&lt;BR /&gt;This is the way we did.&lt;BR /&gt;&lt;BR /&gt;disable root logins&lt;BR /&gt;for admins, create rootadm1 rootadm2 etc&lt;BR /&gt;&lt;BR /&gt;then &lt;BR /&gt;grep for su for these uses from /var/adm/sulog&lt;BR /&gt;&lt;BR /&gt;schedule in cron to e-mail the grep results.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 24 May 2009 04:34:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425374#M354905</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2009-05-24T04:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425375#M354906</link>
      <description>Hi Basheer.&lt;BR /&gt;&lt;BR /&gt;Pls give your full script.</description>
      <pubDate>Sun, 24 May 2009 10:08:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425375#M354906</guid>
      <dc:creator>senthil_kumar_1</dc:creator>
      <dc:date>2009-05-24T10:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425376#M354907</link>
      <description>Hi James R. Ferguson,&lt;BR /&gt;&lt;BR /&gt; your script is well suiting for my needs.&lt;BR /&gt;&lt;BR /&gt;But it is not working when we are using "su" instead "su -" as Dennis Handly said.&lt;BR /&gt;&lt;BR /&gt;How to solve this.&lt;BR /&gt;&lt;BR /&gt;And i want to get a mail when exit from root user.&lt;BR /&gt;&lt;BR /&gt;And One more thing i want to add that i want to monitor that what are commands has been entered by sued user.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hi Bill Hassell,&lt;BR /&gt;&lt;BR /&gt;  where we have to run your script like cron and when?.&lt;BR /&gt;&lt;BR /&gt; pls explain.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 24 May 2009 10:58:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425376#M354907</guid>
      <dc:creator>senthil_kumar_1</dc:creator>
      <dc:date>2009-05-24T10:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425377#M354908</link>
      <description>Hi (again) Senthil:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But it is not working when we are using "su" instead "su -" as Dennis Handly said.&lt;BR /&gt;&lt;BR /&gt;Yes, that's true.  You specifically asked for "...mail whenever a user is using "su -" to get root access" so that's the solution I offered.&lt;BR /&gt;&lt;BR /&gt;I think Kenan Erdey's solution, using a continuous 'tail' of the '/var/adm/sylog' is a much better solution than mine for several reasons.  Think about it.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 24 May 2009 12:03:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425377#M354908</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-05-24T12:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425378#M354909</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;for monitoring what root does (after su -) you can check root's history file as mentioned before. or convert the system to trusted mode.&lt;BR /&gt;&lt;BR /&gt;but if you think admins can delete history and you don't trust them, you can send logs to central log server.</description>
      <pubDate>Sun, 24 May 2009 16:41:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425378#M354909</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2009-05-24T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425379#M354910</link>
      <description>Hi Kenan Erdey,&lt;BR /&gt;&lt;BR /&gt; When we have to run your script?&lt;BR /&gt;&lt;BR /&gt; do we have to configure this in crontab?&lt;BR /&gt;&lt;BR /&gt; what is the time interval?&lt;BR /&gt;&lt;BR /&gt; pls explain.</description>
      <pubDate>Wed, 27 May 2009 12:18:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425379#M354910</guid>
      <dc:creator>senthil_kumar_1</dc:creator>
      <dc:date>2009-05-27T12:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425380#M354911</link>
      <description>Actually "/root/.sh_histor" all the commands history that has been entered after getting root login.&lt;BR /&gt;&lt;BR /&gt;But the promblem is how to know that what are the commands has been executed by what users?&lt;BR /&gt;&lt;BR /&gt;How to find that these commands are entered by what users?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 May 2009 12:22:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425380#M354911</guid>
      <dc:creator>senthil_kumar_1</dc:creator>
      <dc:date>2009-05-27T12:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425381#M354912</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;Check the sulog file for knowing who has done su login to root.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Sunny</description>
      <pubDate>Wed, 27 May 2009 12:39:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425381#M354912</guid>
      <dc:creator>Sunny123_1</dc:creator>
      <dc:date>2009-05-27T12:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425382#M354913</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; When we have to run your script?&lt;BR /&gt;&lt;BR /&gt;just run the script in background. unless you   or another root kill the process, it will run in the background check sulog file. &lt;BR /&gt;&lt;BR /&gt;&amp;gt; How to find that these commands are entered by what users?&lt;BR /&gt;&lt;BR /&gt;searched some. i knew, it's not supposed to give user id 0 to users for beeing root, but hp wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/5992-3387/ch02s11.html" target="_blank"&gt;http://docs.hp.com/en/5992-3387/ch02s11.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;if users switch to root, you can keep seperate history file according to ip, here is an example:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1220391" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1220391&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 May 2009 12:53:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425382#M354913</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2009-05-27T12:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425383#M354914</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Honestly, my approach would be to take the output of the above scripts, condense it down into a daily report, in a file and use this script to deliver it:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/?p=7" target="_blank"&gt;http://www.hpux.ws/?p=7&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 27 May 2009 12:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425383#M354914</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-05-27T12:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: I want to get a mail whenever a user is using "su -" to get root access.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425384#M354915</link>
      <description>Senthil,&lt;BR /&gt;&lt;BR /&gt;As you may or may not have realized, auditing root users after they become root, is next to impossible with the built-in unix tools. Once they access the root level, they have the keys to the kingdom and they can do whatever they want, delete sh_history files, modify syslog and remove all the traces that they were there as root. So, the solution to your problem is questionable at best, using the tools provided the OS.&lt;BR /&gt;&lt;BR /&gt;If you are being chased by the auditors, none of the solutions offered will fly in the face of professional auditors like Deloitte, Price-Waterhouse etc. If you are only looking for this as an information only tool, there are several real good suggestions above, but if you are looking into this as an audit tool, I have some bad news for you: You need to spend money ! Buy/License PowerBroker for hpux from Symark. Using, powerbroker, you can record every keystroke a user does on the system where this software is installed and writes them to a log on a remote server, even this user is root. I have used this product while I was contracting at HP and it is great, alas not cheap.</description>
      <pubDate>Wed, 27 May 2009 13:11:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-want-to-get-a-mail-whenever-a-user-is-using-quot-su-quot-to/m-p/4425384#M354915</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2009-05-27T13:11:20Z</dc:date>
    </item>
  </channel>
</rss>

