- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tar: couldn't get uname for uid 4968268
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2009 02:38 PM
тАО11-17-2009 02:38 PM
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".
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.
Please advise on how to proceed.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2009 03:24 PM
тАО11-17-2009 03:24 PM
Re: tar: couldn't get uname for uid 4968268
http://docs.hp.com/en/B2355-60105/tar.1.html
o
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:
name - cannot create
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.
maybe relevant ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2009 04:14 PM
тАО11-17-2009 04:14 PM
Re: tar: couldn't get uname for uid 4968268
This issue could occurr if you delete a user without removinig the files of these users.
To find the files that tar issues this warning about, you could
search for files with uid set equal to 496826 (in our example):
cd /;ll -R | grep 496826
To get rid of the warnings, either remove the files, or use the
chown(1) commmand to give them a valid owner
Best Regards,
Prashanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2009 04:54 PM
тАО11-17-2009 04:54 PM
Re: tar: couldn't get uname for uid 4968268
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 11:06 AM
тАО11-18-2009 11:06 AM
Re: tar: couldn't get uname for uid 4968268
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.
tar cvf foo.tar /home/user/test/app && rm -f /home/user/test/app
And I just found that the && rm part of the command works on AIX but not on HP-UX. Could someone comment on this?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 11:25 AM
тАО11-18-2009 11:25 AM
Re: tar: couldn't get uname for uid 4968268
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 11:50 AM
тАО11-18-2009 11:50 AM
SolutionThen build an if statement around the tar return code.
Something like:
tar cvf foo.tar /home/user/test/app
RETCODE=$?
if (( ${RETCODE} == 0 || ${RETCODE} == 3 )) ; then
rm -f /home/user/test/app
else
echo "The tar command returned error: ${RETCODE}"
fi
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 11:59 AM
тАО11-18-2009 11:59 AM
Re: tar: couldn't get uname for uid 4968268
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 12:03 PM
тАО11-18-2009 12:03 PM
Re: tar: couldn't get uname for uid 4968268
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.
So my script snippet would look like:
tar cvf foo.tar /home/user/test/app
RETCODE=$?
if (( ${RETCODE} == 0 || ${RETCODE} == 5 )) ; then
rm -f /home/user/test/app
else
echo "The tar command returned error: ${RETCODE}"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 01:09 PM
тАО11-18-2009 01:09 PM