<?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 Changing UID's in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677592#M52399</link>
    <description>I am setting up a global NIS environment and we want to change all of our UID's to a new five digit standard in our company.  So basically I need an idea on how to change multiple UID's from the standard HP-UX 11.0 3 digits ones to a new five digit one (in sequential order).  I know I can do this through vi'ing the /etc/passwd but I need to change all of the files associated with these users also.  Maybe someone has a script to do this or even an idea for a script to do this...or, better yet, knows a simple way to do it.  I am aware SAM can automate this process a bit but doing each user, one by one, is literally hours of work per server.  Any help would be much appreciated!  Thanks everyone!</description>
    <pubDate>Wed, 06 Mar 2002 21:34:50 GMT</pubDate>
    <dc:creator>Matthew F. Carr</dc:creator>
    <dc:date>2002-03-06T21:34:50Z</dc:date>
    <item>
      <title>Changing UID's</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677592#M52399</link>
      <description>I am setting up a global NIS environment and we want to change all of our UID's to a new five digit standard in our company.  So basically I need an idea on how to change multiple UID's from the standard HP-UX 11.0 3 digits ones to a new five digit one (in sequential order).  I know I can do this through vi'ing the /etc/passwd but I need to change all of the files associated with these users also.  Maybe someone has a script to do this or even an idea for a script to do this...or, better yet, knows a simple way to do it.  I am aware SAM can automate this process a bit but doing each user, one by one, is literally hours of work per server.  Any help would be much appreciated!  Thanks everyone!</description>
      <pubDate>Wed, 06 Mar 2002 21:34:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677592#M52399</guid>
      <dc:creator>Matthew F. Carr</dc:creator>
      <dc:date>2002-03-06T21:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Changing UID's</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677593#M52400</link>
      <description>Mathew&lt;BR /&gt;&lt;BR /&gt;Do one in SAM and then look at sam log, you should be able to unpick what sam did and then script what you want.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Test on test server.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 06 Mar 2002 21:39:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677593#M52400</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-03-06T21:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Changing UID's</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677594#M52401</link>
      <description>I would suggest something like this:&lt;BR /&gt;&lt;BR /&gt;Create a textfile with login and new UID, a pair per line. Call it 'userlist'.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;cat "userlist" | while read USER UID&lt;BR /&gt;  do&lt;BR /&gt;     echo "User: ${USER} New UID: ${UID}"&lt;BR /&gt;     usermod -u ${UID} ${USER}&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;That should do it. You also need a find script to change the ownership of all his files.&lt;BR /&gt;&lt;BR /&gt;     &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Mar 2002 21:41:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677594#M52401</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-03-06T21:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Changing UID's</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677595#M52402</link>
      <description>Hi again:&lt;BR /&gt;&lt;BR /&gt;You may find the attached script useful to get you started. It reads the existing passwd file and produces the following output:&lt;BR /&gt;user&lt;TAB&gt;uid&lt;TAB&gt;uid + 10000&lt;BR /&gt;&lt;BR /&gt;This should help to get you started.&lt;BR /&gt;&lt;BR /&gt;&lt;/TAB&gt;&lt;/TAB&gt;</description>
      <pubDate>Wed, 06 Mar 2002 22:30:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677595#M52402</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-03-06T22:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Changing UID's</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677596#M52403</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I once wrote a script while I was at University to perform such a task.  I was migrating a few old HP boxes into out new NIS system and all the usernames and ID's and groups needed changing, so I wrote this little script.  Have a look, it works really well (although I haven't used it for 3 years!  Hopefully it still works...and the code is pretty rough in places, like I said, I was at university at the time).  It will also optionally modify group files and group ID's, which is handy.  &lt;BR /&gt;&lt;BR /&gt;One bug: I assumed when I wrote it that hashing out an entry in the password file meant that it was no longer available.  Wrong, it simply means that that user id now has a username which happens to begin with a hash (#) now. eg #testuser instead of the old testuser name.  Simply delete any usernames in /etc/passwd with a hash infront of them, these are old, the new user entry will be the same except with the new user id.  &lt;BR /&gt;&lt;BR /&gt;Just simply create a little script which will call the cfown.sh script for each user/group id you want to change and run that one night when everything is quiet.  I suggest changing group id's before user id's.&lt;BR /&gt;&lt;BR /&gt;Hope this helps, I haven't used it for some time now and I can't remember if there were any limitations.  I think now that there are probably some better command line arguments to 'find' which would suit us better than the ones I used.&lt;BR /&gt;&lt;BR /&gt;cheers,&lt;BR /&gt;&lt;BR /&gt;- Andy Gray&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Mar 2002 03:47:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677596#M52403</guid>
      <dc:creator>support_5</dc:creator>
      <dc:date>2002-03-07T03:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Changing UID's</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677597#M52404</link>
      <description>Hey Andy, thanks for your reply, could you shoot me that script in an email form?  Thanks.  My email is matthew.carr@effem.com</description>
      <pubDate>Sat, 28 Sep 2002 05:57:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-uid-s/m-p/2677597#M52404</guid>
      <dc:creator>Matthew F. Carr</dc:creator>
      <dc:date>2002-09-28T05:57:17Z</dc:date>
    </item>
  </channel>
</rss>

