<?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: Moving passwd file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811651#M84467</link>
    <description>Thanks everyone for your help. BTW, the system I will move the passwd file to is not in use and therefore I don't have to worry about what already exists. I will try the recommendations and go from there. &lt;BR /&gt;</description>
    <pubDate>Mon, 23 Sep 2002 19:06:18 GMT</pubDate>
    <dc:creator>Mike Kapsak</dc:creator>
    <dc:date>2002-09-23T19:06:18Z</dc:date>
    <item>
      <title>Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811646#M84462</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a requirement to move the passwd file from one server to another only taking those user-id's accessed within the last 90 days. Can anybody point me in the right direction without getting overwhelmed?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Mike Kapsak</description>
      <pubDate>Mon, 23 Sep 2002 18:08:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811646#M84462</guid>
      <dc:creator>Mike Kapsak</dc:creator>
      <dc:date>2002-09-23T18:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811647#M84463</link>
      <description>IF you are on a nontrusted system then copu your /etc/passwd file as /etc/passwd.old .&lt;BR /&gt;&lt;BR /&gt;Then write a script using the command lastb to find out which users logged in during the past 90 days , remove entries for all other users in the passwd.old file , then copy this file onto your new server as /etc/passwd .</description>
      <pubDate>Mon, 23 Sep 2002 18:14:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811647#M84463</guid>
      <dc:creator>Ashwani Kashyap</dc:creator>
      <dc:date>2002-09-23T18:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811648#M84464</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Try this way.&lt;BR /&gt;&lt;BR /&gt;1. Run last -R &amp;gt; /tmp/success&lt;BR /&gt;2. "vi /tmp/success" and delete the entries that are more than 90 days old. Determine the&lt;BR /&gt;90 days old date (say Jun 23), search for it by using " :.,$d " in the vi session and save&lt;BR /&gt;the file.&lt;BR /&gt;3. Do "awk '{print $1}' /tmp/success |sort |uniq &amp;gt; /tmp/logins". Delete wtmp, root and other system logins  from the list.&lt;BR /&gt;4. Now get the entries using&lt;BR /&gt;&lt;BR /&gt;for i in `cat /tmp/logins`&lt;BR /&gt;do&lt;BR /&gt;grep ^$i /etc/passwd &amp;gt;&amp;gt; /tmp/passwd.delta&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;5. passwd.delta contains only user logins. Copy this to the other system and "append" it to the /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;Things will be little bit complicated if you are using trusted systems.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Mon, 23 Sep 2002 18:15:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811648#M84464</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-09-23T18:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811649#M84465</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Try this way.&lt;BR /&gt;&lt;BR /&gt;1. Run last -R &amp;gt; /tmp/success&lt;BR /&gt;2. "vi /tmp/success" and delete the entries that are more than 90 days old. Determine the&lt;BR /&gt;90 days old date (say Jun 23), search for it by using " :.,$d " in the vi session and save&lt;BR /&gt;the file.&lt;BR /&gt;3. Do "awk '{print $1}' /tmp/success |sort |uniq &amp;gt; /tmp/logins". Delete wtmp, root and other system logins  from the list.&lt;BR /&gt;4. Now get the entries using&lt;BR /&gt;&lt;BR /&gt;for i in `cat /tmp/logins`&lt;BR /&gt;do&lt;BR /&gt;grep ^$i /etc/passwd &amp;gt;&amp;gt; /tmp/passwd.delta&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;5. passwd.delta contains only user logins. Copy this to the other system and "append" it to the /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;Things will be little bit complicated if you are using trusted systems.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;PS: By the way, I do not know the scope of "overwhelming". We only try to help each other here.</description>
      <pubDate>Mon, 23 Sep 2002 18:16:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811649#M84465</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-09-23T18:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811650#M84466</link>
      <description>Well, I wouldn't move the password file - too much likelihood of conflicting user IDs.&lt;BR /&gt;&lt;BR /&gt;If you want to see which users have had $HOME directory contents that have been changed in the last 90 days, assuming that they are all in /home:&lt;BR /&gt;&lt;BR /&gt;find /home/* -mtime -90 -prune -print | cut -d"/" -f1 | sort -u&lt;BR /&gt;&lt;BR /&gt;That might miss a few folks who didn't change any files. So you could try:&lt;BR /&gt;&lt;BR /&gt;for i in `cut -f1 -d":" /etc/passwd` &lt;BR /&gt;do&lt;BR /&gt;last $i | head -1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;You'd have to add something, probably using caljd.sh, to figure out the date. Or just redirect into a file and edit the list by hand.&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Mon, 23 Sep 2002 18:20:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811650#M84466</guid>
      <dc:creator>Tom Maloy</dc:creator>
      <dc:date>2002-09-23T18:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811651#M84467</link>
      <description>Thanks everyone for your help. BTW, the system I will move the passwd file to is not in use and therefore I don't have to worry about what already exists. I will try the recommendations and go from there. &lt;BR /&gt;</description>
      <pubDate>Mon, 23 Sep 2002 19:06:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811651#M84467</guid>
      <dc:creator>Mike Kapsak</dc:creator>
      <dc:date>2002-09-23T19:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Moving passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811652#M84468</link>
      <description>If these user's require login access , then, unless you intend importing the users' $HOME data from the original server, you will need to create a home directory for each user... and, as a minimum, copy the contents of /etc/skel to each.&lt;BR /&gt;&lt;BR /&gt;Alternatively, you might want to set up one new user on the second system, to be used as a skeleton for the rest.  Copy the contents of the skeleton user's virginal $HOME to each of the imported user's home directories.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Sep 2002 02:08:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-passwd-file/m-p/2811652#M84468</guid>
      <dc:creator>Jim Walls</dc:creator>
      <dc:date>2002-09-25T02:08:29Z</dc:date>
    </item>
  </channel>
</rss>

