<?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: Migrating Certain Users between 2 Trusted Systems in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057919#M305545</link>
    <description>Thanks Stephen.&lt;BR /&gt;&lt;BR /&gt;I don't see files or auth under /etc. Did you mean /tcb?&lt;BR /&gt;&lt;BR /&gt;The problem with manually copying the entire subdirectories (a, b, c, etc) is that I will get users that I dont want.&lt;BR /&gt;&lt;BR /&gt;I think the best way is going to be to write a script to grep through passwd for every userid matching whatever GID we want, then find each subdirectory in /tcb/files/auth and create a tar file that can be copied to /tcb on the new system.</description>
    <pubDate>Tue, 21 Aug 2007 13:55:16 GMT</pubDate>
    <dc:creator>NateJones</dc:creator>
    <dc:date>2007-08-21T13:55:16Z</dc:date>
    <item>
      <title>Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057917#M305543</link>
      <description>Greetings,&lt;BR /&gt;&lt;BR /&gt;We have about 35 HP/UX boxes (all trusted), and every so often we need to migrate a client to a new HP box, but we only want to move certain users as the box usually contains at least two clients.&lt;BR /&gt;&lt;BR /&gt;Does anyone have a method or tool of moving users by, say, gid? &lt;BR /&gt;&lt;BR /&gt;The only way I have done it in the past is:&lt;BR /&gt;&lt;BR /&gt;- cut/paste the entries out of the the passwd/group files&lt;BR /&gt;- go through /tcb/auth and copy the subdirectory for each user from the old box to the new one.&lt;BR /&gt;&lt;BR /&gt;As you can imagine, this is incredibly time consuming and error prone. :(&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Nate</description>
      <pubDate>Tue, 21 Aug 2007 12:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057917#M305543</guid>
      <dc:creator>NateJones</dc:creator>
      <dc:date>2007-08-21T12:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057918#M305544</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;1) Do an Ignite backup of the vg00 on the system before you start.&lt;BR /&gt;&lt;BR /&gt;2) cd /etc&lt;BR /&gt;&lt;BR /&gt;Under here there is either auth/files or files/auth&lt;BR /&gt;&lt;BR /&gt;Your users are arrayed in 26 different folders for the first letter of reach user name.&lt;BR /&gt;&lt;BR /&gt;cd a&lt;BR /&gt;scp -p * newsystemhostname:/$PWD&lt;BR /&gt;repeat for all letters ACCEPT r&lt;BR /&gt;&lt;BR /&gt;Why not r, because ROOT is in there.&lt;BR /&gt;&lt;BR /&gt;Copy those files one at a time, not including root.&lt;BR /&gt;&lt;BR /&gt;Copy the optional user entries from /etc/passwd and /etc/group on the new system. Take care not to overwrite the system and deamon users.&lt;BR /&gt;&lt;BR /&gt;Restart the target system.&lt;BR /&gt;&lt;BR /&gt;Your users should be functional and transfer correctly.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 21 Aug 2007 13:20:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057918#M305544</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-08-21T13:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057919#M305545</link>
      <description>Thanks Stephen.&lt;BR /&gt;&lt;BR /&gt;I don't see files or auth under /etc. Did you mean /tcb?&lt;BR /&gt;&lt;BR /&gt;The problem with manually copying the entire subdirectories (a, b, c, etc) is that I will get users that I dont want.&lt;BR /&gt;&lt;BR /&gt;I think the best way is going to be to write a script to grep through passwd for every userid matching whatever GID we want, then find each subdirectory in /tcb/files/auth and create a tar file that can be copied to /tcb on the new system.</description>
      <pubDate>Tue, 21 Aug 2007 13:55:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057919#M305545</guid>
      <dc:creator>NateJones</dc:creator>
      <dc:date>2007-08-21T13:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057920#M305546</link>
      <description>You are on the right track with yout scripting but grep is a terrible choice for matching GID's or logins. For example, grep "20" /etc/passwd would match UID 20, GID 20, GID 200, GID 2000, GID 120, .... Instead use something like&lt;BR /&gt;&lt;BR /&gt;typeset -i GID=20&lt;BR /&gt;awk -v gid=${GID} -F ':' '{if (($4 + 0) == (gid + 0)) print $0}' /etc/passwd&lt;BR /&gt;&lt;BR /&gt;which will match only GID 20.&lt;BR /&gt;&lt;BR /&gt;There are some other "gotcha's" as well. You need to make sure that UID 200 on box A is not already in use; ditto for audit id;s, and GID's.&lt;BR /&gt;&lt;BR /&gt;The best way to approach this problem is to implement a unified passwd/group management system such as LDAP so that you only do this in one place and the changes are visible everywhere. &lt;BR /&gt;</description>
      <pubDate>Tue, 21 Aug 2007 14:12:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057920#M305546</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-08-21T14:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057921#M305547</link>
      <description>Thanks. Yea, I was being somewhat generic with my language. Thanks for the advice though!&lt;BR /&gt;&lt;BR /&gt;As for your gotchas, they have definitely been problems in the past, esp. the duplicate user name! We'll add some logic for that.&lt;BR /&gt;&lt;BR /&gt;Lastly, my knowledge of LDAP is extremely limited, but my understanding is that it can't be used, or at least used effectively or easily, because each HP box is on a completely separate network. Each box can't even see another one.</description>
      <pubDate>Tue, 21 Aug 2007 14:33:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057921#M305547</guid>
      <dc:creator>NateJones</dc:creator>
      <dc:date>2007-08-21T14:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057922#M305548</link>
      <description>To give a little something back, I've attached 2 perl scripts that one of my guys wrote for me today to transfer particular groups of users from one box to another.&lt;BR /&gt;&lt;BR /&gt;(Remove the .txt extension before you run them on the HP machine.)&lt;BR /&gt;&lt;BR /&gt;HP2PASSWD.pl - On an HP system this script creates an /etc/passwd like file whose location is specified in the script of a client that is also specified in the script that contains the password hash. This file can be imported to an HP Server with the PASSWD2HP.pl script &lt;BR /&gt;&lt;BR /&gt;PASSWD2HP.pl - This script imports the /etc/passwd like files created by the above scripts to an HP system by creating new users and injecting the password hash into their /tcb/files/auth files. &lt;BR /&gt;&lt;BR /&gt;Hopefully these will be helpful to others in my situation.&lt;BR /&gt;&lt;BR /&gt;Nate</description>
      <pubDate>Tue, 21 Aug 2007 18:40:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057922#M305548</guid>
      <dc:creator>NateJones</dc:creator>
      <dc:date>2007-08-21T18:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating Certain Users between 2 Trusted Systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057923#M305549</link>
      <description>Couple more things:&lt;BR /&gt;&lt;BR /&gt;1. The first script is read-only, except for creating the output file wherever you choose. The second file, passwd2hp, writes to both /etc/passwd and creates the subdirectories in /tcb/files/auth. I STRONGLY recommend you backup the passwd file and tar up the /tcb/files/auth directory before you run it!&lt;BR /&gt;&lt;BR /&gt;2. One good thing about this script, is that the output of the HP2PASSWD script is a standard passwd file. This is good because another situation we are often in having to transfer users from a non-trusted system to a trusted one. This means the PASSWD2HP script will take either the output from HP2PASSWD OR a non-trusted regular passwd file! This once also very helpful for me.&lt;BR /&gt;&lt;BR /&gt;Nate</description>
      <pubDate>Tue, 21 Aug 2007 18:47:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/migrating-certain-users-between-2-trusted-systems/m-p/4057923#M305549</guid>
      <dc:creator>NateJones</dc:creator>
      <dc:date>2007-08-21T18:47:11Z</dc:date>
    </item>
  </channel>
</rss>

