<?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: running script as root in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550652#M17765</link>
    <description>The owner of the file is root, with the group set as users:&lt;BR /&gt;-rwsr-xr-x    1 root     users        6578 May 20 14:25 manarc.shl&lt;BR /&gt;&lt;BR /&gt;Should I flip the group setting back to root?</description>
    <pubDate>Tue, 24 May 2005 10:10:27 GMT</pubDate>
    <dc:creator>Jim Mickens_1</dc:creator>
    <dc:date>2005-05-24T10:10:27Z</dc:date>
    <item>
      <title>running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550646#M17759</link>
      <description>I have a script that was originally set up under HP-UX 10.20 that allows my users to archive their jobs.  What the script does is allows the user to enter the job and it's location, then the script changes the priveleges of all the files under the job so that everyone has access to them, compresses the directory and then moves the job directory to a file system designated for the archives.  Due to the chmod command in the script, and the fact that the user doing the archive wasn't necessarily the user that owned the files, I had the file set to run as root (chmod 4755) under hp-ux.  We're migrating the users to a RH Linux AS server, and the script, even though I have the same 4755 priveleges set on it, does not run as root, so the chmod won't work due to different owners of the files.  Can someone help me figure out how to get this to work?</description>
      <pubDate>Tue, 24 May 2005 08:29:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550646#M17759</guid>
      <dc:creator>Jim Mickens_1</dc:creator>
      <dc:date>2005-05-24T08:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550647#M17760</link>
      <description>&lt;BR /&gt;you can use sudo which will run programs as root&lt;BR /&gt;&lt;BR /&gt;all that user has to execute is 'sudo program'&lt;BR /&gt;you should have each allowed user name entry in /etc/sudoers file&lt;BR /&gt;&lt;BR /&gt;do man sudo for more information&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi</description>
      <pubDate>Tue, 24 May 2005 08:58:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550647#M17760</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-05-24T08:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550648#M17761</link>
      <description>Isn't adding the users to the /etc/sudoers file going to give them access to other things as well?  I'm not sure I want to be able to do that.</description>
      <pubDate>Tue, 24 May 2005 09:01:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550648#M17761</guid>
      <dc:creator>Jim Mickens_1</dc:creator>
      <dc:date>2005-05-24T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550649#M17762</link>
      <description>&lt;BR /&gt;No you can explicitly say which programs are allowed to run as root for each user. check man sudoers to find out how to acheive this.&lt;BR /&gt;&lt;BR /&gt;eg: &lt;BR /&gt;&lt;BR /&gt;Cmnd_Alias CMD = /path/to/program&lt;BR /&gt;User_Alias USER = user1, user2&lt;BR /&gt;&lt;BR /&gt;USER ALL = NOPASSWD: CMD&lt;BR /&gt;&lt;BR /&gt;NOPASSWD will allow user to run the command without giving their password&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi</description>
      <pubDate>Tue, 24 May 2005 09:08:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550649#M17762</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-05-24T09:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550650#M17763</link>
      <description>I'll look into it.  Thanks.</description>
      <pubDate>Tue, 24 May 2005 09:12:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550650#M17763</guid>
      <dc:creator>Jim Mickens_1</dc:creator>
      <dc:date>2005-05-24T09:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550651#M17764</link>
      <description>Did you change the owner of the file to root too ?&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 24 May 2005 10:07:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550651#M17764</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2005-05-24T10:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550652#M17765</link>
      <description>The owner of the file is root, with the group set as users:&lt;BR /&gt;-rwsr-xr-x    1 root     users        6578 May 20 14:25 manarc.shl&lt;BR /&gt;&lt;BR /&gt;Should I flip the group setting back to root?</description>
      <pubDate>Tue, 24 May 2005 10:10:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550652#M17765</guid>
      <dc:creator>Jim Mickens_1</dc:creator>
      <dc:date>2005-05-24T10:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: running script as root</title>
      <link>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550653#M17766</link>
      <description>Under Linux, you using SetUID or SetGID on a *script* won't work (i.e. starts with #!).  It's purposely disabled.&lt;BR /&gt;&lt;BR /&gt;Once upon a time, it used to work, but we're talking back in the 1.2 series kernel days.&lt;BR /&gt;&lt;BR /&gt;These days, you either 'sudo' the entire script (as already suggested).&lt;BR /&gt;&lt;BR /&gt;In any case, make sure the users do not have *write* access (i.e. 0511) to the script file, as this will allow them to do whatever they want under the guise of the script.</description>
      <pubDate>Tue, 24 May 2005 10:17:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/running-script-as-root/m-p/3550653#M17766</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-05-24T10:17:58Z</dc:date>
    </item>
  </channel>
</rss>

