- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- tar: couldn't get uname for uid 4968268
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
tar: couldn't get uname for uid 4968268
SOLVED- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-17-2009 03:24 PM
11-17-2009 03:24 PM
Re: tar: couldn't get uname for uid 4968268
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-17-2009 04:14 PM
11-17-2009 04:14 PM
Re: tar: couldn't get uname for uid 4968268
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-17-2009 04:54 PM
11-17-2009 04:54 PM
Re: tar: couldn't get uname for uid 4968268
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2009 11:06 AM
11-18-2009 11:06 AM
Re: tar: couldn't get uname for uid 4968268
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2009 11:25 AM
11-18-2009 11:25 AM
Re: tar: couldn't get uname for uid 4968268
Re: tar: couldn't get uname for uid 4968268
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2009 11:59 AM
11-18-2009 11:59 AM
Re: tar: couldn't get uname for uid 4968268
Re: tar: couldn't get uname for uid 4968268
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2009 12:03 PM
11-18-2009 12:03 PM
Re: tar: couldn't get uname for uid 4968268
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2009 01:09 PM
11-18-2009 01:09 PM
Re: tar: couldn't get uname for uid 4968268
Re: tar: couldn't get uname for uid 4968268
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2009 01:09 PM
11-18-2009 01:09 PM
Re: tar: couldn't get uname for uid 4968268
Re: tar: couldn't get uname for uid 4968268
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP