<?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: tar: couldn't get uname for uid 4968268 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210034#M464784</link>
    <description>The "tar: couldn't get uname for uid 496826" message should **NOT** cause tar itself to fail.&lt;BR /&gt;&lt;BR /&gt;Is all of this done via a script of some sort?  If so, is it checking the return code of tar when the tar command finished?  If it is then it may be seeing a non-zero return code and then failing.&lt;BR /&gt;&lt;BR /&gt;Have you tried running a manual tar with a sub-set of the files and see if it succeeds?  If it does, check the return code when it finishes with a "echo $?".  See if it is 0 or some other value.</description>
    <pubDate>Wed, 18 Nov 2009 00:54:11 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2009-11-18T00:54:11Z</dc:date>
    <item>
      <title>tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210031#M464781</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I found a similar thread but my issue is a bit different. I am taring up files and directories with unknown UID and GID on my servers (AIX and HP-UX) and deleting them. The tar and deletion works fine for AIX but it is failing for HP-UX with the error "tar: couldn't get uname for uid 496826".&lt;BR /&gt;&lt;BR /&gt;I already know that this UID does not exist in /etc/passwd. My tar is failing and eventually the deletion as well. FYI..the tar up of files before deletion is a precautionary measure.&lt;BR /&gt;&lt;BR /&gt;Please advise on how to proceed.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 17 Nov 2009 22:38:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210031#M464781</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2009-11-17T22:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210032#M464782</link>
      <description>would help to know syntax an version of o/s but ....&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60105/tar.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60105/tar.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;o&lt;BR /&gt;&lt;BR /&gt;    Suppress writing certain directory information that older versions of tar cannot handle on input. tar normally writes information specifying owners and modes of directories in the archive. Earlier versions of tar, when encountering this information, give error messages of the form:&lt;BR /&gt;&lt;BR /&gt;    name - cannot create&lt;BR /&gt;&lt;BR /&gt;    When o is used for reading, it causes the extracted file to take on the user and group IDs of the user running the program rather than those on the tape. This is the default for the ordinary user and can be overridden, to the extent that system protections allow, by using the p function modifier.&lt;BR /&gt;&lt;BR /&gt;maybe relevant ?</description>
      <pubDate>Tue, 17 Nov 2009 23:24:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210032#M464782</guid>
      <dc:creator>Alex Glennie</dc:creator>
      <dc:date>2009-11-17T23:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210033#M464783</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This issue could occurr if you delete a user without removinig the files of these users.&lt;BR /&gt;&lt;BR /&gt;To find the files that tar issues this warning about, you could &lt;BR /&gt;search for files with uid set equal to 496826 (in our example): &lt;BR /&gt;&lt;BR /&gt;     cd /;ll -R | grep 496826 &lt;BR /&gt;&lt;BR /&gt;To get rid of the warnings, either remove the files, or use the &lt;BR /&gt;chown(1) commmand to give them a valid owner&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Prashanth</description>
      <pubDate>Wed, 18 Nov 2009 00:14:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210033#M464783</guid>
      <dc:creator>Prashanth.D.S</dc:creator>
      <dc:date>2009-11-18T00:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210034#M464784</link>
      <description>The "tar: couldn't get uname for uid 496826" message should **NOT** cause tar itself to fail.&lt;BR /&gt;&lt;BR /&gt;Is all of this done via a script of some sort?  If so, is it checking the return code of tar when the tar command finished?  If it is then it may be seeing a non-zero return code and then failing.&lt;BR /&gt;&lt;BR /&gt;Have you tried running a manual tar with a sub-set of the files and see if it succeeds?  If it does, check the return code when it finishes with a "echo $?".  See if it is 0 or some other value.</description>
      <pubDate>Wed, 18 Nov 2009 00:54:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210034#M464784</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-11-18T00:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210035#M464785</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;Yes you are right the tar is being done as expected but the removal of file is failing. I am pasting the command in the script that does that.&lt;BR /&gt;&lt;BR /&gt;tar cvf foo.tar /home/user/test/app &amp;amp;&amp;amp; rm -f /home/user/test/app&lt;BR /&gt;&lt;BR /&gt;And I just found that the &amp;amp;&amp;amp; rm part of the command works on AIX but not on HP-UX. Could someone comment on this?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 18 Nov 2009 19:06:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210035#M464785</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2009-11-18T19:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210036#M464786</link>
      <description>Since the tar command is returning a non-zero value? Can someone help in adding logic to the tar command not to worry about uid/gid of the file?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Wed, 18 Nov 2009 19:25:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210036#M464786</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2009-11-18T19:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210037#M464787</link>
      <description>First, find out what the return code is that it is returning in this case.&lt;BR /&gt;&lt;BR /&gt;Then build an if statement around the tar return code.&lt;BR /&gt;&lt;BR /&gt;Something like:&lt;BR /&gt;&lt;BR /&gt;tar cvf foo.tar /home/user/test/app &lt;BR /&gt;RETCODE=$?&lt;BR /&gt;&lt;BR /&gt;if (( ${RETCODE} == 0 || ${RETCODE} == 3 )) ; then&lt;BR /&gt;rm -f /home/user/test/app&lt;BR /&gt;else&lt;BR /&gt;echo "The tar command returned error: ${RETCODE}"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;In the 'if' statement above substitute the return code that 'tar' is currently returning where "${RETCODE} == 3".  You want to leave the '0' test since a normal return code is 0.&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2009 19:50:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210037#M464787</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-11-18T19:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210038#M464788</link>
      <description>I agree with Patrick.  The only question I'd have is, "Does any other warning in tar return an exit code of 3".  I couldn't find the errors documented in any HP-UX man page I examined.</description>
      <pubDate>Wed, 18 Nov 2009 19:59:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210038#M464788</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-18T19:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210039#M464789</link>
      <description>I was only using '3' as an example above.&lt;BR /&gt;&lt;BR /&gt;I just did a couple of quick tests and on my 11.11 and 11.23 servers, a return code of '5' is given when you the the "couldn't get uname for uid" warning.&lt;BR /&gt;&lt;BR /&gt;So my script snippet would look like:&lt;BR /&gt;&lt;BR /&gt;tar cvf foo.tar /home/user/test/app&lt;BR /&gt;RETCODE=$?&lt;BR /&gt;if (( ${RETCODE} == 0 || ${RETCODE} == 5 )) ; then&lt;BR /&gt;rm -f /home/user/test/app&lt;BR /&gt;else&lt;BR /&gt;echo "The tar command returned error: ${RETCODE}"&lt;BR /&gt;fi</description>
      <pubDate>Wed, 18 Nov 2009 20:03:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210039#M464789</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-11-18T20:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210040#M464790</link>
      <description>That's right Patrick. I have used exit code of 5. Thanks for your help.</description>
      <pubDate>Wed, 18 Nov 2009 21:09:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210040#M464790</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2009-11-18T21:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: tar: couldn't get uname for uid 4968268</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210041#M464791</link>
      <description>thanks.</description>
      <pubDate>Wed, 18 Nov 2009 21:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-couldn-t-get-uname-for-uid-4968268/m-p/5210041#M464791</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2009-11-18T21:09:55Z</dc:date>
    </item>
  </channel>
</rss>

