Operating System - HP-UX
1846588 Members
1783 Online
110256 Solutions
New Discussion

Re: usermod command changed permissions - Disaster

 
SOLVED
Go to solution
brian_31
Super Advisor

usermod command changed permissions - Disaster

Team:

I did this command.

usermod -u 209 www (to change the UID of the user www) and it changed every permission on the machine under / recursively.
How do i revert this? How come it changed everything under root directory? Anyone help please.

Thanks

Brian.
8 REPLIES 8
RAC_1
Honored Contributor

Re: usermod command changed permissions - Disaster

Are you sure this command changed the permissions?? Are the permissions changed or the ownership of file/dirs changed??

Do you have the latest backup??

Anil
There is no substitute to HARDWORK
brian_31
Super Advisor

Re: usermod command changed permissions - Disaster

All the directories are now owned by www:other

Thanks

Brian.
Cheryl Griffin
Honored Contributor

Re: usermod command changed permissions - Disaster

swverify will identify everything that is no longer the system default.

# swverify \*
Look at the /var/adm/sw/swagent.log for details. It will include permissions, owner and group problems in great detail.
"Downtime is a Crime."
Jeff Schussele
Honored Contributor

Re: usermod command changed permissions - Disaster

Hi Brian,

Frankly I'm having a hard time believing that the usermod command did this. The *only* way to affect files with the usermod command is with the -d (home dir) & -m (move home dir) parameters.
It's more likely that a chown command followed after the usermod & it's the culprit.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
brian_31
Super Advisor

Re: usermod command changed permissions - Disaster

Jeff:

Beleive me!!!!! I tried it on other B2000 workstation and DISASTER AGAIN. It changes all ownerships to www:other. Just usermod -u 209 www. That is all. Any ideas??

Thanks

Brian
Jeff Schussele
Honored Contributor

Re: usermod command changed permissions - Disaster

Hi Brian,

I believe you.
You haven't stated the OS, but if 11.0 look at PHCO_29380 - useradd/usermod cumulative:

http://www2.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHCO_29380&context=hpux:800:11:00

It definitively spells out that symptom.
Curiously I don't find that in the 11.11 patch.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
brian_31
Super Advisor

Re: usermod command changed permissions - Disaster

Jeff:

Yes it is 11.0

Thanks

Brian
Cheryl Griffin
Honored Contributor
Solution

Re: usermod command changed permissions - Disaster

Just wanted to confirm. This was a reported problem. The fix was originally released in a patch March 2003:
Patch Name: PHCO_28505
Patch Description: s700_800 11.00 user/group(add/mod/del)(1M) cumulative patch

And as Jeff correctly indicated, it is now supersede PHCO_29380
"Downtime is a Crime."