Trying to remove a user from one of our servers, but I seem to be thwarted at every turn...
SMC refuses to load the user list (failing with a NoClassDefFoundError in the listAll method of UserContent).
vipw just returns with "vipw: /etc/passwd file busy".
I'm the only user on the system at the moment (it's our backup SRSS box), and both of these fail even right after a reboot. I don't have console access at the moment either unfortunately (or I would try single user mode). Of course, even if init mode S worked and let me do this one task, it doesn't solve the root problem.
Ideas?
-
check with
fuser /etc/passwd
what process is using it and kill it. obviously make sure it's safe to kill that process.Brian Knoblauch : Helpful. I had forgotten about the "fuser" command (apparently I learned something new that made that not fit in my head anymore)... fuser claims that nscd has it locked. Killed nscd and now fuser claims it's wide open, yet both vipw and smc are still failing. So, it didn't actually solve the main problem, but added another question: "Why is nscd tying up the file on this particular box?".pulegium : hmm been a while since i touched solaris (i guess last sol experience was with sol9, so i missed all the new beauty things in sol10)... i can only guess that nscd trying to cache user info (why though??). i presume other boxes do not manifest this behaviour? ah well at least i reminded you about the fuser, hopefully that didn't push smth else out! ;)Brian Knoblauch : You're correct, the other Solaris boxes have no problem with either SMC or vipw.pra : vipw also looks at /etc/ptmp when checking /etc/passwd for availability. Clearing or removing that lock file should help.Brian Knoblauch : Yep, ptmp contains the passwd file! I wonder what might be setting locking via /etc/ptmp though?From pulegium -
Solution (actually, workaround) found (at least for SMC, still baffled by vipw problem) at: http://forums.sun.com/thread.jspa?messageID=10266935
rogerfujii says:
Sigh. They broke the classpath somewhere. This is not the correct fix, but will get you by if you need it to work (don't really understand what is supposed to get loaded where, so I stuck it at the end of the process): Edit /usr/sadm/lib/smc/bin/smc Add this line: L10NJARS="${L10NJARS} ${JARPATH}/../../VCommon.jar ${JARPATH}/../../usermgr/*.jar" just before the "for jar in ${L10NJARS}; do" line. (this is the smallest "fix", as it takes advantage of the shell expansion to deal with all the usermgr stuff). Save. You want to keep the original around and put it back when/if sun ever gets around to fixing this, just in case the fix doesn't include this file.
From Brian Knoblauch
0 comments:
Post a Comment