<?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: Who has su-ed as root? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102125#M738899</link>
    <description>An alternative would be to use sudo. This will give the users access to root commands (advisable to disable su to root) and give you a full record of who has done what.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
    <pubDate>Wed, 09 Apr 2008 08:45:16 GMT</pubDate>
    <dc:creator>MarkSyder</dc:creator>
    <dc:date>2008-04-09T08:45:16Z</dc:date>
    <item>
      <title>Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102122#M738896</link>
      <description>Hi,&lt;BR /&gt;I have a group of users who really needs to be root on machines.&lt;BR /&gt;I have created a user id for each user, and disable the root direct login in sshd_config. So what I want is the users log into the system with their owm userid and then su to root. But I want to create a root ssh_history file for each user, I mean, I want a file named something like .ssh_history_userid to be able to know who has issued a command on the system as root.&lt;BR /&gt;So my question is, how can I know in the moment of the su to root who has issued the su.&lt;BR /&gt;I hope I have been clear on my explanation...&lt;BR /&gt;Thanks in advance!!</description>
      <pubDate>Tue, 08 Apr 2008 14:43:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102122#M738896</guid>
      <dc:creator>mogiro</dc:creator>
      <dc:date>2008-04-08T14:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102123#M738897</link>
      <description>echo $LOGNAME</description>
      <pubDate>Tue, 08 Apr 2008 14:47:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102123#M738897</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2008-04-08T14:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102124#M738898</link>
      <description>Try:&lt;BR /&gt;&lt;BR /&gt;who am i&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Tue, 08 Apr 2008 14:50:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102124#M738898</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2008-04-08T14:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102125#M738899</link>
      <description>An alternative would be to use sudo. This will give the users access to root commands (advisable to disable su to root) and give you a full record of who has done what.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Wed, 09 Apr 2008 08:45:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102125#M738899</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2008-04-09T08:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102126#M738900</link>
      <description>u can implement sudo&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2008 08:48:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102126#M738900</guid>
      <dc:creator>Sajjad Sahir</dc:creator>
      <dc:date>2008-04-09T08:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102127#M738901</link>
      <description>&lt;BR /&gt;1. set the path variable to run the &lt;BR /&gt;vi sudo by using the command&lt;BR /&gt;#PATH=$PATH:/usr/local/sbin&lt;BR /&gt;&lt;BR /&gt;#vi sudo&lt;BR /&gt; enter the user name to access as a &lt;BR /&gt;super user</description>
      <pubDate>Wed, 09 Apr 2008 08:55:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102127#M738901</guid>
      <dc:creator>Sajjad Sahir</dc:creator>
      <dc:date>2008-04-09T08:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102128#M738902</link>
      <description>Hi all,&lt;BR /&gt;I know the sudo option, but I trust in these user's, no problem with them. I just want to know who do what.&lt;BR /&gt;The who am i option is the best solution to my question. Thanks to all for your comments.</description>
      <pubDate>Wed, 09 Apr 2008 09:27:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102128#M738902</guid>
      <dc:creator>mogiro</dc:creator>
      <dc:date>2008-04-09T09:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102129#M738903</link>
      <description>su doesn't change LOGNAME env variable&lt;BR /&gt;so you can use it.</description>
      <pubDate>Wed, 09 Apr 2008 11:23:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102129#M738903</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2008-04-09T11:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102130#M738904</link>
      <description>Try this in /etc/profile&lt;BR /&gt;I didn't do a lot of testing, but if I was logged in as myself, this detected the shell owner and worked.  If you su to root after you have su'd to root, it can be defeated.&lt;BR /&gt;&lt;BR /&gt;It is also defeated if you su (without the dash)&lt;BR /&gt;&lt;BR /&gt;It will give you a start anyway.&lt;BR /&gt;&lt;BR /&gt;############# snip&lt;BR /&gt;&lt;BR /&gt;MYUSER=$(who -u |grep $PPID |awk '{ print $1 }')&lt;BR /&gt;if [ -n "$MYUSER" ];then&lt;BR /&gt;        MYUSER=_$MYUSER&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HISTFILE=$HOME/.sh_history$MYUSER&lt;BR /&gt;############ snip done&lt;BR /&gt;&lt;BR /&gt;Rob...</description>
      <pubDate>Wed, 09 Apr 2008 14:44:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102130#M738904</guid>
      <dc:creator>Robin T. Slotten</dc:creator>
      <dc:date>2008-04-09T14:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102131#M738905</link>
      <description>Hi,&lt;BR /&gt;I did something similar to keep the IP and the user in the .profile of the root user:&lt;BR /&gt;&lt;BR /&gt;USER=`who am i|awk '{print $1}'`&lt;BR /&gt;REG=`who am i|awk '{print $2}'`;VAR=`who -R | grep $REG | awk '{print $6}'| cut -d "(" -f 2 | cut -d ")" -f 1`&lt;BR /&gt;HISTFILE=${HOME}/.sh_history/.sh_history_$VAR"_"$USER&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2008 14:52:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102131#M738905</guid>
      <dc:creator>mogiro</dc:creator>
      <dc:date>2008-04-09T14:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Who has su-ed as root?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102132#M738906</link>
      <description>USER=`who am i|awk '{print $1}'`&lt;BR /&gt;REG=`who am i|awk '{print $2}'`;VAR=`who -R | grep $REG | awk '{print $6}'| cut -d "(" -f 2 | cut -d ")" -f 1`&lt;BR /&gt;HISTFILE=${HOME}/.sh_history/.sh_history_$VAR"_"$USER</description>
      <pubDate>Wed, 09 Apr 2008 14:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-has-su-ed-as-root/m-p/5102132#M738906</guid>
      <dc:creator>mogiro</dc:creator>
      <dc:date>2008-04-09T14:52:35Z</dc:date>
    </item>
  </channel>
</rss>

