- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: useradd bug? "/etc/passwd file does not exist"...
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
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
тАО10-27-2004 06:29 PM
тАО10-27-2004 06:29 PM
I got a couple TCB HP-UX 11.00 boxes which consistently fail on 'useradd' with a misleading error message. Of course /etc/passwd exists (and users can login normally, too), and useradd works on many other boxes with the same (replicated) /etc/passwd, /etc/group and TCB structure.
root@to173:/# useradd dummy
/etc/passwd file does not exist
root@to173:/#
root@to173:/# lsof /etc/passwd
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pwgrd 12117 root 11r VREG 64,0x3 82241 4364 /etc/passwd
root@to173:/# /sbin/init.d/pwgr stop
pwgrd stopped
root@to173:/# lsof /etc/passwd
root@to173:/#
root@to173:/# useradd dummy
/etc/passwd file does not exist
pwgrd seems to make no difference: running or not, same error.
There is no leftover 'vipw', or any other process with a handle on /etc/passwd or /etc/group.
However, the existence or not of /etc/.pwd.lock makes a small difference (regardless of where this file came from; I can just use 'touch'):
- the error message changes
- takes a few seconds to return (a timeout?), as opposed to immediate return in the first case.
root@to173:/# lsof /etc/.pwd.lock
root@to173:/# lsof /etc/passwd
root@to173:/# lsof /etc/group
root@to173:/# useradd dummy
/etc/passwd file does not exist <= ERROR #1
root@to173:/#
root@to173:/# rm /etc/.pwd.lock
root@to173:/# useradd dummy
/etc/passwd file busy -- try again <= ERROR #2
root@to173:/#
root@to173:/# touch /etc/.pwd.lock
root@to173:/# useradd dummy
/etc/passwd file does not exist <= ERROR #1, back again
A similar thread: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=261248 has some interesting suggestions, but no solution.
Any ideas? Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2004 06:36 PM
тАО10-27-2004 06:36 PM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
There is one more file that affects /etc/passwd modifications. /etc/ptmp. If you have it, them move it as say /etc/ptmp.old and then try.
Make sure there are no other commands running on the system like usermod etc., that will lock /etc/passwd file.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2004 07:10 PM
тАО10-27-2004 07:10 PM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
I forgot to mention, no /etc/ptmp either...
And, as the lack of output from lsof indicates, there appear to be no processes with open handles on /etc/passwd. However, quite a few processes got an open handle on /tcb/files/auth/system/default, including init itself.
--TP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2004 07:18 PM
тАО10-27-2004 07:18 PM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
# /usr/sbin/pwck -s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2004 07:20 PM
тАО10-27-2004 07:20 PM
SolutionHi,
try searchin in the tech base, e.g. Document id: A5392162 or USECKBRC00008679
or try these links:
http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062950294
http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062922674
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2004 08:04 PM
тАО10-27-2004 08:04 PM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
You have to have the file .pwd.lock and ensure the permissions are root:sys and 400.
I guess 'pwck' 'grpck' and 'authck' may give some hints.
Also try running 'tusc' along with your useradd command and see if you can find any clues out of it.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2004 11:17 PM
тАО10-27-2004 11:17 PM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2004 01:15 AM
тАО10-29-2004 01:15 AM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
On the other hand, the weird behaviour documented above between '/etc/.pwd.lock' and 'useradd' (or usermod) remains obscure.
Most pwck warnings look rather harmless (empty fields), but authck's reported TCB vs. /etc/passwd diffs are more worrisome.
There are some "expected differences": some old-time scripts delete TCB files for expired/deleted accounts on a server, but keep the passwd/group entry to identify (uid, gid) preserved and backed-up files. It did not seem to cause problems before, but those scripts obviously do not use useradd/userdel commands... Does anyone have experience with such a setup?
In fact, similarly-looking TCB inconsistencies exist on machines where useradd works and those where it fails. Any clues on that?
Our servers run a complex mix of critical applications and scripts, and touching such a fragile status quo is always a bit suicidal. I've seen too many horror stories involving the sloppy 'tsconvert -r' + 'tsconvert', (although suggested by HP). And 'pwconv' (basically a wrapper around 'tsconvert -u') is not more reassuring.
So now, I wonder:
1] which TCB inconsistencies actually make useradd fail? and which are harmless?
2] What's the SAFEST way to fix everything authck complains about? is it doable with zero downtime?
Thanks in advance,
-- TP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2004 01:40 AM
тАО10-29-2004 01:40 AM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2004 04:42 AM
тАО10-29-2004 04:42 AM
Re: useradd bug? "/etc/passwd file does not exist" and "/etc/passwd file busy -- try again"
to go to the tech base:
on this page, click on "maintenance and support for hp products".
On the following page click on "technical knowledge base": there you will then find a good search tool for searching e.g. error messages.
regards,
John K.