<?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: how to change the root equal id UID in HP-UX? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6965278#M490193</link>
    <description>&lt;P&gt;This is an example of a "c wrapper" I cobbled together for&amp;nbsp;one of our&amp;nbsp;lp&amp;nbsp;scripts. We don't have sudo installed on our OS and wanted a way to evelvate a user when it is called from our db to modify our printers from a web portal. You could maybe use this idea with setresuid to change it's real ID and remove it in the same process? Hope that helps.. I've never been in that spot before.&lt;/P&gt;&lt;PRE&gt;/* real uid root wrapper for adding printers */

#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;

int main( int argc, char *argv[] )
{
  char String[255];
  setresuid(0,-1,-1);
  sprintf(String, "addqueue -i 5 -h %s -q %s -r off -t off -L AUTO -D on -b off", argv[1], argv[2]);
  system(String);
  return 0;
}&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 May 2017 16:17:27 GMT</pubDate>
    <dc:creator>bgwest</dc:creator>
    <dc:date>2017-05-19T16:17:27Z</dc:date>
    <item>
      <title>how to change the root equal id UID in hp-unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929202#M489960</link>
      <description>&lt;P&gt;we already created the root equal user ID(test) now we need to change the UID (tets) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the procedure . if change the UID(test) , if their is any effect in root account. please confirm.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 20:32:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929202#M489960</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2017-01-03T20:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in hp-unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929221#M489961</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt; created the root equal user ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Created what? &amp;nbsp;What is a "root equal user ID"? &amp;nbsp;Are you using something like RBAC or something? &amp;nbsp;Can you please elaborate?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 22:03:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929221#M489961</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2017-01-03T22:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in hp-unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929255#M489962</link>
      <description>&lt;P&gt;Are you saying that you created another root user (which is a user with UID=0)? If so, this is a very bad idea. It creates many very bad scenarios that you may not have understood. You need to read about the program sudo and how to allow selected users access to specific root commands. Here is a useful discussion about duplicate UID 0 accounts:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hpe.com/t5/System-Administration/Duplicate-root-user/td-p/3591386" target="_blank"&gt;https://community.hpe.com/t5/System-Administration/Duplicate-root-user/td-p/3591386&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 02:12:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929255#M489962</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2017-01-04T02:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929404#M489963</link>
      <description>&lt;P&gt;You are trying to remove the root capabilities for user test?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:23:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6929404#M489963</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2017-01-04T14:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6930795#M489964</link>
      <description>&lt;P&gt;yes you are right.&lt;/P&gt;&lt;P&gt;we have already created test user .&amp;nbsp;&lt;/P&gt;&lt;P&gt;now the root and test user have same UID that is 0&lt;/P&gt;&lt;P&gt;so now i want to remove the test user account. if i remove the test user account we can expect any performance issue in server ?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 18:20:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6930795#M489964</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2017-01-10T18:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6930848#M489966</link>
      <description>Your duplicate root user with UID 0 is just an alias to root.&lt;BR /&gt;The important question is: how did you remove the extra root user? Whatever you do, NEVER remove a UID 0 user with sam. Early versions of sam would ask you if you want to also remove all the files owned by this user. If you say yes, EVERY file owned by UID 0 will be removed...which destroys the entire computer!&lt;BR /&gt;Since you said you have already removed the duplicate root user, I assume that your system has not crashed and is still running.&lt;BR /&gt;The UID 0 alias, as mentioned before is a very bad idea, but it seems that you have rectified the situation. So there should not be any performance issue.</description>
      <pubDate>Tue, 10 Jan 2017 22:18:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6930848#M489966</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2017-01-10T22:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in hp-unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6935445#M489978</link>
      <description>&lt;P&gt;You could also use sudo which is a better way to control privileges. As the last commentor mentioned it's bad practice, to have duplicated UID's of zero. You can install sudo via&amp;nbsp;&lt;SPAN&gt;HP-UX Internet Express components for HP-UX 11i v3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://bit.ly/2kacPtj" target="_blank"&gt;http://bit.ly/2kacPtj&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 17:14:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6935445#M489978</guid>
      <dc:creator>knowledgebase</dc:creator>
      <dc:date>2017-01-27T17:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the root equal id UID in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6965278#M490193</link>
      <description>&lt;P&gt;This is an example of a "c wrapper" I cobbled together for&amp;nbsp;one of our&amp;nbsp;lp&amp;nbsp;scripts. We don't have sudo installed on our OS and wanted a way to evelvate a user when it is called from our db to modify our printers from a web portal. You could maybe use this idea with setresuid to change it's real ID and remove it in the same process? Hope that helps.. I've never been in that spot before.&lt;/P&gt;&lt;PRE&gt;/* real uid root wrapper for adding printers */

#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;

int main( int argc, char *argv[] )
{
  char String[255];
  setresuid(0,-1,-1);
  sprintf(String, "addqueue -i 5 -h %s -q %s -r off -t off -L AUTO -D on -b off", argv[1], argv[2]);
  system(String);
  return 0;
}&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 May 2017 16:17:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-change-the-root-equal-id-uid-in-hp-unix/m-p/6965278#M490193</guid>
      <dc:creator>bgwest</dc:creator>
      <dc:date>2017-05-19T16:17:27Z</dc:date>
    </item>
  </channel>
</rss>

