<?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: Changing userids in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018610#M745360</link>
    <description>&lt;!--!*#--&gt;Hi Mark:&lt;BR /&gt;&lt;BR /&gt;Have a look at the manpages for 'usermod', 'chown' and 'find'.  You could easily construct a script driven by a file containing the 'uid', OLDNAME and NEWNAME associations; something link:&lt;BR /&gt;&lt;BR /&gt;while read UID OLDNAME NEWNAME&lt;BR /&gt;do&lt;BR /&gt;   usermod -u ${UID}-l ${OLDNAME} ${NEWNAME}&lt;BR /&gt;   find /app -user ${OLDNAME} -exec chown ${NEWNAME} {} \+&lt;BR /&gt;done &amp;lt; /tmp/users&lt;BR /&gt;&lt;BR /&gt;...where the driving '/tmp/users' input might look like:&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/users&lt;BR /&gt;1000 oldmark newmark&lt;BR /&gt;1001 oldsam newsam&lt;BR /&gt;1002 userx userxprime&lt;BR /&gt;1003 usery useryprime&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 12 Jun 2007 13:21:37 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-06-12T13:21:37Z</dc:date>
    <item>
      <title>Changing userids</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018607#M745357</link>
      <description>I've been tasked to change all userid's to a new standard. I've got over 30 HP-UX 11.11 non-trusted servers. The total number of userids that have to be changed is over 1000. Not only do I have to change the userid and home directories, but copy the contents of their old home directory to their new home and change all files they may have created outside of their home directory, with the new owner.&lt;BR /&gt;Anyone have any scripts that may help ?</description>
      <pubDate>Tue, 12 Jun 2007 12:46:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018607#M745357</guid>
      <dc:creator>Mark Nierth</dc:creator>
      <dc:date>2007-06-12T12:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Changing userids</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018608#M745358</link>
      <description>You should not need to actually create any new user ids.&lt;BR /&gt;&lt;BR /&gt;You must remember that ownership is based on the UID number.  Say my id is patrick and I want to change it to p12345.  I would recommend using the 'usermod' command.  I would do:&lt;BR /&gt;&lt;BR /&gt;# usermod -l p12345 patrick&lt;BR /&gt;&lt;BR /&gt;Now I keep the same UID, so all files that previous showed patrick as the owner now show p12345.&lt;BR /&gt;&lt;BR /&gt;Now if you want to move their home directory as well, you can add the '-m' and '-d' options as well.&lt;BR /&gt;&lt;BR /&gt;# usermod -l p12345 -d /home/p12345 -m patrick&lt;BR /&gt;&lt;BR /&gt;That **should** change my login id from patrick to p12345 and move my home directory from /home/patrick (or whatever it was) to /home/p12345.&lt;BR /&gt;&lt;BR /&gt;I would advise studying the man page for usermod as they talk about some permissions requirements when using '-m'.</description>
      <pubDate>Tue, 12 Jun 2007 13:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018608#M745358</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-06-12T13:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing userids</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018609#M745359</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;usermod is the quickest.&lt;BR /&gt;&lt;BR /&gt;If you want to farm it out to a summner intern, you could have them use SAM.  It is not as efficient (and some people do not like sam at all), but it does start a background process to complete the change, and is menu driven</description>
      <pubDate>Tue, 12 Jun 2007 13:13:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018609#M745359</guid>
      <dc:creator>DCE</dc:creator>
      <dc:date>2007-06-12T13:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Changing userids</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018610#M745360</link>
      <description>&lt;!--!*#--&gt;Hi Mark:&lt;BR /&gt;&lt;BR /&gt;Have a look at the manpages for 'usermod', 'chown' and 'find'.  You could easily construct a script driven by a file containing the 'uid', OLDNAME and NEWNAME associations; something link:&lt;BR /&gt;&lt;BR /&gt;while read UID OLDNAME NEWNAME&lt;BR /&gt;do&lt;BR /&gt;   usermod -u ${UID}-l ${OLDNAME} ${NEWNAME}&lt;BR /&gt;   find /app -user ${OLDNAME} -exec chown ${NEWNAME} {} \+&lt;BR /&gt;done &amp;lt; /tmp/users&lt;BR /&gt;&lt;BR /&gt;...where the driving '/tmp/users' input might look like:&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/users&lt;BR /&gt;1000 oldmark newmark&lt;BR /&gt;1001 oldsam newsam&lt;BR /&gt;1002 userx userxprime&lt;BR /&gt;1003 usery useryprime&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 12 Jun 2007 13:21:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018610#M745360</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-06-12T13:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Changing userids</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018611#M745361</link>
      <description>Thanks guys...I didn't realize such a command existed. &lt;BR /&gt;Beers and 10 points all around !!!!</description>
      <pubDate>Tue, 12 Jun 2007 14:21:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-userids/m-p/4018611#M745361</guid>
      <dc:creator>Mark Nierth</dc:creator>
      <dc:date>2007-06-12T14:21:57Z</dc:date>
    </item>
  </channel>
</rss>

