<?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: Reading root mail using sudo in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279688#M180205</link>
    <description>If I am interpreting the setup correctly &lt;BR /&gt;&lt;BR /&gt;They should be able to "sudo su - root" &lt;BR /&gt;then type "mail"&lt;BR /&gt;&lt;BR /&gt;or "sudo su - root -c mail" &lt;BR /&gt;&lt;BR /&gt;Either of those should work. And they should not need the passwd, if sudo prompts for a passwd they can use the operuser passwd they have, they do not need roots passwd. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 18 May 2004 13:05:34 GMT</pubDate>
    <dc:creator>Marvin Strong</dc:creator>
    <dc:date>2004-05-18T13:05:34Z</dc:date>
    <item>
      <title>Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279685#M180202</link>
      <description>We have set up sudo to allow our operators to access root functions without needing the root password.  In the sudoers file, we have set up a User_Alias of OPERUSER.  Under User privilege specification is the following:&lt;BR /&gt;OPERUSER        ALL=(ALL) NOPASSWD: ALL&lt;BR /&gt;&lt;BR /&gt;Most functions are available to the operators but they cannot check to see if root has any mail.  It appears when "mail" is entered, it shows the information for the original user.  Logging on as root does show there is mail.&lt;BR /&gt;&lt;BR /&gt;Any suggestions on how to correct this?&lt;BR /&gt;</description>
      <pubDate>Tue, 18 May 2004 10:33:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279685#M180202</guid>
      <dc:creator>Debbie Beresford</dc:creator>
      <dc:date>2004-05-18T10:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279686#M180203</link>
      <description>I have never used sudo but would guess from this that sudo only gives you the effective user id of 0 (EUID) and that mail does it's checks using the real user id (UID).  If there is no configuration option within sudo to use the real user id you could change the command to "su - root -c mail".  I imagine this should give the user the real uid of 0 and then read the mail.</description>
      <pubDate>Tue, 18 May 2004 10:39:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279686#M180203</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-05-18T10:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279687#M180204</link>
      <description>This does work.  I am a novice so I need to look into sudo further to see if the options you suggest are available.  I also needed the root password to make this work.  Is there a way around this?</description>
      <pubDate>Tue, 18 May 2004 12:48:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279687#M180204</guid>
      <dc:creator>Debbie Beresford</dc:creator>
      <dc:date>2004-05-18T12:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279688#M180205</link>
      <description>If I am interpreting the setup correctly &lt;BR /&gt;&lt;BR /&gt;They should be able to "sudo su - root" &lt;BR /&gt;then type "mail"&lt;BR /&gt;&lt;BR /&gt;or "sudo su - root -c mail" &lt;BR /&gt;&lt;BR /&gt;Either of those should work. And they should not need the passwd, if sudo prompts for a passwd they can use the operuser passwd they have, they do not need roots passwd. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 May 2004 13:05:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279688#M180205</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-05-18T13:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279689#M180206</link>
      <description>The problem is that elm and mail command use the environment variables LOGNAME and MAIL to decide the mailbox to use.&lt;BR /&gt;If u run the command su root the environment is not changed, while if u run the command su - root the environment is exactly the same as logging in as root.&lt;BR /&gt;Try to run the sudo command with a script like&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;export LOGNAME=root&lt;BR /&gt;export MAIL=/var/mail/root&lt;BR /&gt;mail&lt;BR /&gt;&lt;BR /&gt;it should use the root mailbox&lt;BR /&gt;Bye Cesare</description>
      <pubDate>Tue, 18 May 2004 13:15:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279689#M180206</guid>
      <dc:creator>Cesare Salvioni</dc:creator>
      <dc:date>2004-05-18T13:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279690#M180207</link>
      <description>I want to make sure you realize you've given your operators the keys to the kingdom.  They can type in "sudo su -" and get a root shell, and reboot the box or whatever else they want.  On top of this, you are allowing this to happen without any password.&lt;BR /&gt;&lt;BR /&gt;If you want them to only have privilages to run certain commands, it's better to specify each command they have access to in your sudoers file.</description>
      <pubDate>Tue, 18 May 2004 15:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279690#M180207</guid>
      <dc:creator>Paul F. Carlson</dc:creator>
      <dc:date>2004-05-18T15:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279691#M180208</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Once your operator has done sudo to root, let them do a su - root and when they get the root prompt, they should be able to read the root mail.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Tue, 18 May 2004 15:23:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279691#M180208</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-05-18T15:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279692#M180209</link>
      <description>In addition to what Paul said, you should realize that there are TONS of commands that you could put in the sudoers file that could give the user "FULL ROOT" access. &lt;BR /&gt;&lt;BR /&gt;sudo, if not configured right, is just as bad as giving them the root password. You give me sudo access to your system, and unless you know all the holes, I bet I could get a root shell pretty easy.</description>
      <pubDate>Tue, 18 May 2004 15:46:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279692#M180209</guid>
      <dc:creator>Scott J. Showalter</dc:creator>
      <dc:date>2004-05-18T15:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279693#M180210</link>
      <description>Tested this on 11.0, sudo 1.6.7p5:&lt;BR /&gt;&lt;BR /&gt;Add a Cmnd_Alias like:&lt;BR /&gt;&lt;BR /&gt;Cmnd_Alias     ROOTMAIL=/bin/mail -f /var/mail/root&lt;BR /&gt;&lt;BR /&gt;(Sorry, tab / space formating is lost)&lt;BR /&gt;&lt;BR /&gt;Then add ROOTMAIL to your user privilege section.  Keep in mind /bin/mail has a shell escape, so it is not secure.&lt;BR /&gt;&lt;BR /&gt;However if your OPERUSER entry is for real, you are not secure anyway.  I really do not like that entry.&lt;BR /&gt;&lt;BR /&gt;I don't believe in granting more privilege than necessary.  Thats the one drawback to sudo:  If you want it secure, it is a hassle to admin!</description>
      <pubDate>Wed, 19 May 2004 07:31:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279693#M180210</guid>
      <dc:creator>Robert True</dc:creator>
      <dc:date>2004-05-19T07:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279694#M180211</link>
      <description>Opps, forgot to add:&lt;BR /&gt;&lt;BR /&gt;User must enter the command exactly like the Cmnd_Alias, IE:&lt;BR /&gt;&lt;BR /&gt;'sudo /bin/mail -f /var/mail/root'&lt;BR /&gt;&lt;BR /&gt;Rt.</description>
      <pubDate>Wed, 19 May 2004 07:48:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279694#M180211</guid>
      <dc:creator>Robert True</dc:creator>
      <dc:date>2004-05-19T07:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading root mail using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279695#M180212</link>
      <description>Thanks for all of your help.  Also, we will now be reviewing the use of sudo!</description>
      <pubDate>Thu, 03 Jun 2004 07:28:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/reading-root-mail-using-sudo/m-p/3279695#M180212</guid>
      <dc:creator>Debbie Beresford</dc:creator>
      <dc:date>2004-06-03T07:28:20Z</dc:date>
    </item>
  </channel>
</rss>

