<?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: Addind users to sudoers in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124201#M687902</link>
    <description>I have added the line to the sudoers using visudo&lt;BR /&gt;&lt;BR /&gt;Helpdesk logon is set up and script is in place , when they logon and run the script is says ou must be supeuser, did I miss something when I added the line?  Thanks&lt;BR /&gt;&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL, ! /usr/bin/passwd root, !/usr/bin/passwd oracle</description>
    <pubDate>Mon, 18 Aug 2008 16:22:23 GMT</pubDate>
    <dc:creator>Charles Keyser</dc:creator>
    <dc:date>2008-08-18T16:22:23Z</dc:date>
    <item>
      <title>Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124193#M687894</link>
      <description>Question about sudoers If I add the Help Desk in to the sudoers file (see below).&lt;BR /&gt;Will this allow then to run the script with root privileges or do I need to add&lt;BR /&gt;/usr/lbin/modprpw -x&lt;BR /&gt;Also I will need them to run commands to cancel print jobs &lt;BR /&gt;In the sudoers file allowing the Help Desk authorization to run this as root?&lt;BR /&gt;&lt;BR /&gt;drt9986 ALL=(ALL) NOPASSWD: ALL&lt;BR /&gt;cjk1402 ALL=(OP) NOPASSWD: ALL&lt;BR /&gt;jhf1366 ALL=(OP) NOPASSWD: ALL&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;CJ</description>
      <pubDate>Mon, 11 Aug 2008 11:27:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124193#M687894</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-11T11:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124194#M687895</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;in this configuration you give whole root permission. instead just give command paths what you want them to run like:&lt;BR /&gt;&lt;BR /&gt;drt9986 ALL=(ALL) NOPASSWD: &amp;lt;script_path&amp;gt;, /usr/bin/cancel&lt;BR /&gt;&lt;BR /&gt;Kenan.</description>
      <pubDate>Mon, 11 Aug 2008 11:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124194#M687895</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2008-08-11T11:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124195#M687896</link>
      <description>Well, if root is in the OP group then the help desk can run any and all commands as root without a password. So they are basically root.</description>
      <pubDate>Mon, 11 Aug 2008 11:44:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124195#M687896</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-08-11T11:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124196#M687897</link>
      <description>Thanks all&lt;BR /&gt;&lt;BR /&gt;Court&lt;BR /&gt;&lt;BR /&gt;If I understand you correctly, this will allow the Help Desk to logon as Help Desk and execute  all commands that are on my Help Desk Screen, see below&lt;BR /&gt;&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL&lt;BR /&gt;&lt;BR /&gt;SCREEN SELECTIONS&lt;BR /&gt;&lt;BR /&gt;1. Display printer status  / print jobs.&lt;BR /&gt;    a. Enter lpstat -p to view all printers &lt;BR /&gt;    b. Enter lpstat -o to view all print request&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 2. Cancel a print job.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 3. Cancel ALL print jobs for a printer.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 4. Unlockes and Resets User Passwords&lt;BR /&gt;    NOTE: A number or a group of letters will show on the screen, write down and provide this information to the user&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 5. This will execute the TOP command to look at the high load average on the servers. Monitoring purposes&lt;BR /&gt;    NOTE: Control C breaks the process and returns to the Main Menu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 6. EXIT this program.</description>
      <pubDate>Mon, 11 Aug 2008 11:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124196#M687897</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-11T11:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124197#M687898</link>
      <description>Yes, but if they can exit out of the menu they can do whatever they want, ie, sudo rm -fr /*. That is a too much power for the help desk. You should only give them access to what they need. I would suggest you look up command aliases. And only allow them what they need. Otherwise it is just security through obscurity.</description>
      <pubDate>Mon, 11 Aug 2008 11:54:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124197#M687898</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-08-11T11:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124198#M687899</link>
      <description>Court&lt;BR /&gt;&lt;BR /&gt;Thanks. I have written the script so they can not break out of it. I will set it up and test it on the servers they need to access. Thanks again 10++++ for you</description>
      <pubDate>Mon, 11 Aug 2008 13:16:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124198#M687899</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-11T13:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124199#M687900</link>
      <description>Question on the HelpDesk as adding into the sudoers&lt;BR /&gt;&lt;BR /&gt;I was testing my script and found that if I eneter root or oracle on the line for password change (see below) It can be changed. How would I enter this in the sudoers to exclude root and oracle?&lt;BR /&gt;&lt;BR /&gt;4. Unlockes and Resets User Passwords&lt;BR /&gt;    NOTE: A number or a group of letters will show on the screen, write down and provide this information to the user</description>
      <pubDate>Tue, 12 Aug 2008 10:49:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124199#M687900</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-12T10:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124200#M687901</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;add commands to exclude:&lt;BR /&gt;&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL, ! /usr/bin/passwd root, !/usr/bin/passwd oracle</description>
      <pubDate>Tue, 12 Aug 2008 10:53:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124200#M687901</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2008-08-12T10:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124201#M687902</link>
      <description>I have added the line to the sudoers using visudo&lt;BR /&gt;&lt;BR /&gt;Helpdesk logon is set up and script is in place , when they logon and run the script is says ou must be supeuser, did I miss something when I added the line?  Thanks&lt;BR /&gt;&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL, ! /usr/bin/passwd root, !/usr/bin/passwd oracle</description>
      <pubDate>Mon, 18 Aug 2008 16:22:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124201#M687902</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-18T16:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124202#M687903</link>
      <description>Nothing personal but you might want to read up on the sudoers file.&lt;BR /&gt;&lt;BR /&gt;From: &lt;A href="http://www.gratisoft.us/sudo/man/sudoers.html" target="_blank"&gt;http://www.gratisoft.us/sudo/man/sudoers.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It is generally not effective to ``subtract'' commands from ALL using the '!' operator. A user can trivially circumvent this by copying the desired command to a different name and then executing that. For example:&lt;BR /&gt;&lt;BR /&gt;    bill        ALL = ALL, !SU, !SHELLS&lt;BR /&gt;&lt;BR /&gt;Doesn't really prevent bill from running the commands listed in SU or SHELLS since he can simply copy those commands to a different name, or use a shell escape from an editor or other program. Therefore, these kind of restrictions should be considered advisory at best (and reinforced by policy).</description>
      <pubDate>Mon, 18 Aug 2008 16:33:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124202#M687903</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-08-18T16:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124203#M687904</link>
      <description>also, does your script have sudo before the specific commands?</description>
      <pubDate>Mon, 18 Aug 2008 16:35:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124203#M687904</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-08-18T16:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124204#M687905</link>
      <description>Court&lt;BR /&gt;&lt;BR /&gt;Here is the command line and no it does not have the sudo &lt;BR /&gt;&lt;BR /&gt;4) echo "Username to modify \c"; read USER&lt;BR /&gt; TESTUSER=`awk -v USER=${USER} -F: '$1~USER { print $1 }' /etc/passwd`  &lt;BR /&gt; if test "${USER}" != "${TESTUSER}"&lt;BR /&gt; then&lt;BR /&gt; echo "${USER} is invalid!"&lt;BR /&gt; echo "Press [ENTER] to continue. \c"&lt;BR /&gt; read NOTHING&lt;BR /&gt; else&lt;BR /&gt; #This command looks at the account if it has a password liftime expired it will reset the account and enable it &lt;BR /&gt; /usr/lbin/modprpw -x ${USER}&lt;BR /&gt; sleep 10</description>
      <pubDate>Mon, 18 Aug 2008 16:44:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124204#M687905</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-18T16:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124205#M687906</link>
      <description>Hi Charles:&lt;BR /&gt;&lt;BR /&gt;The '/usr/lbin/modprpw' command requires you to be root to execute.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 18 Aug 2008 16:52:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124205#M687906</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-18T16:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124206#M687907</link>
      <description>Thanks I researched it modified the script, tested it, works fine now. I appreciate your input&lt;BR /&gt;&lt;BR /&gt;CJ</description>
      <pubDate>Mon, 18 Aug 2008 16:55:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124206#M687907</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-18T16:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124207#M687908</link>
      <description>I would like to address the script again. Below is the line from the script, below that is the sudoers line. The script works fine, when I execute the script to change the passwords that works fine. However when I execute it again to change reset ags1643, I should not be able to do it since it is commented in sudoers not to be changed. This is not working, is there something I missed in the soders command line to exclude root, oracle and ags1643  Thanks -CJ&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo "Username to modify \c"; read USER&lt;BR /&gt; TESTUSER=`awk -v USER=${USER} -F: '$1~USER { print $1 }' /etc/passwd`  &lt;BR /&gt; if test "${USER}" != "${TESTUSER}"&lt;BR /&gt; then&lt;BR /&gt; echo "${USER} is invalid!"&lt;BR /&gt; echo "Press [ENTER] to continue. \c"&lt;BR /&gt; read NOTHING&lt;BR /&gt; else&lt;BR /&gt; #This command looks at the account if it has a password liftime expired it will reset the account and enable it &lt;BR /&gt; sudo /usr/lbin/modprpw -x ${USER}&lt;BR /&gt; sleep 10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SUDOERS&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL, ! /usr/bin/passwd root, !/usr/bin/passwd oracle, !/usr/bin/passwd ags1643&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Aug 2008 12:36:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124207#M687908</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-26T12:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124208#M687909</link>
      <description>The sudoers entry you pasted only tries to prevent the specific command "/usr/bin/passwd ags1643". The fragment of script you pasted is running /usr/lbin/modprpw, not /usr/bin/passwd.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Aug 2008 15:39:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124208#M687909</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2008-08-26T15:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124209#M687910</link>
      <description>If I understand you correctly where I user/bin/modprpw I should replace with usr/bin/passwd  &lt;BR /&gt;&lt;BR /&gt;Then the sudoers file should fine?&lt;BR /&gt;&lt;BR /&gt;Correct?&lt;BR /&gt;&lt;BR /&gt;One other question, I want to trap the CTR C &lt;BR /&gt;In my script I have trap ' ' INT, however when I do a CTR C (and I am still testing my script)&lt;BR /&gt;When I select number 6 on my script see below, I am taken to a $(prompt) I am trying to avoid any breakouts in the script that would put me at a prompt Thank -CJ &lt;BR /&gt;&lt;BR /&gt;6*|Qq|bye|Ee ) print "Quitting! See You Later, $(whoami)" ; exit ;;</description>
      <pubDate>Tue, 26 Aug 2008 17:39:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124209#M687910</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-26T17:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124210#M687911</link>
      <description>Hi Charles:&lt;BR /&gt;&lt;BR /&gt;Trapping the control_C as you showed is fine, but this isn't going to prevent your script (upon) 'exit' from returning you to a shell prompt, *or* for that matter from a smart user using a piped 'more' to enter a shell.&lt;BR /&gt;&lt;BR /&gt;You can either 'exec' your script from a login profile --- which means that your environment becomes your script and when you exit that, you are logged off; &lt;BR /&gt;&lt;BR /&gt;OR:&lt;BR /&gt;&lt;BR /&gt;You can replace the definition of the account's "shell" in '/etc/passwd' with the full patch of your script.  &lt;BR /&gt;&lt;BR /&gt;Either solution above, means that an 'exit' terminates your script AND the user's login session; AND that the user cannot enter a shell.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 26 Aug 2008 17:50:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124210#M687911</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-26T17:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124211#M687912</link>
      <description>Thanks that worked great, I am not able to breakout, my peers are testing the script also. &lt;BR /&gt;&lt;BR /&gt;Your thoughts on the sudoers file, last thread&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;-CJ</description>
      <pubDate>Tue, 26 Aug 2008 18:04:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124211#M687912</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-26T18:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Addind users to sudoers</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124212#M687913</link>
      <description>Sudo question, last comment &lt;BR /&gt;&lt;BR /&gt; The sudoers entry you pasted only tries to prevent the specific command "/usr/bin/passwd ags1643". The fragment of script you pasted is running /usr/lbin/modprpw, not /usr/bin/passwd.&lt;BR /&gt;&lt;BR /&gt;I have changed the sudo file (see below)&lt;BR /&gt;However when I run my script I am still abe to change the password. Any suggestions? &lt;BR /&gt;Below is the script line.&lt;BR /&gt;&lt;BR /&gt;HelpDesk ALL=(OP) NOPASSWD: ALL, ! /usr/bin/passwd root, !/usr/bin/passwd oracle, !/usr/bin/passwd ajh1809&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Script line&lt;BR /&gt;sudo passwd ${USER}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;-CJ&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2008 13:19:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addind-users-to-sudoers/m-p/5124212#M687913</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2008-08-27T13:19:07Z</dc:date>
    </item>
  </channel>
</rss>

