Operating System - HP-UX
1825756 Members
2372 Online
109687 Solutions
New Discussion

URGENT - root lost execution permission

 
Thi Vu
Frequent Advisor

URGENT - root lost execution permission

Hello everyone,

Help! I goofed and cause root to lose execution permission. I'm signed in a root but when I do any command (ls or cp ) I got this message: sh: l: Execute permission denied.

Any help appreciate.

9 REPLIES 9
someone_4
Honored Contributor

Re: URGENT - root lost execution permission

what do you get when you do
/usr/bin/env

Deepak Extross
Honored Contributor

Re: URGENT - root lost execution permission

Hmm..interesting. Can you do a 'cat' of any local text file?

And whatever you do, DON'T LOG OUT TILL THIS PROBLEM IS FIXED TO YOUR SATISFATION!
Dave La Mar
Honored Contributor

Re: URGENT - root lost execution permission

1. Check your history file for root (.sh_history) to see what was done.
2. If you cannot do so with the current root login, do not log out.
3. Open another session, login in with an su account having root priviledge or sysadm. Look in the .sh_history file an undue what might have been done.
Hope this helps.
Good luck.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Deepak Extross
Honored Contributor

Re: URGENT - root lost execution permission

Dave is right..the history file should be the first place to look.
I suspect that your libdld.sl has got corrupted. Can you ftp into this machine, 'cd /usr/lib', and tell us what 'ls *dld*' shows?
Steven Sim Kok Leong
Honored Contributor

Re: URGENT - root lost execution permission

Hi,

Did you accidentally mass remove the executable permissions from all the files in /usr/bin?

Check the permissions:
# /sbin/ls -la /usr/bin/ls
# /sbin/ls -la /usr/bin/cp

If the execute bits are not present, since /usr/bin/chmod might have the execute bits removed as well, set permissions by:
# /sbin/chmod +x /usr/bin/*

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Santosh Nair_1
Honored Contributor

Re: URGENT - root lost execution permission

Also another thing to check is the permissions on /usr/lib/libc.sl...since most of the executables in /usr/bin are dynamically linked to libc. Make sure that this library (like all shared libraries) has execute permissions. You should be able to use the utilities in /sbin to check and make these changes (these executables are statically linked and therefore do not have a dependancy on libc.


Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Dave La Mar
Honored Contributor

Re: URGENT - root lost execution permission

Assuming you are still employed, can you share the resolution?
Thanks.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Thi Vu
Frequent Advisor

Re: URGENT - root lost execution permission

Hello everyone,

I'm sorry for the delay response but I needed to bring that machine up fast so I rebooted the system to single user mode; however that did NOT work either - the system complain "...exec /usr/lbin error..". In the end I would have to Ignite the server from the tape.

Before rebooting the server I tried to do a simple command such as: ls, cat or more it did not work thus I was not able to look into the .sh_history file to see what happened . I was able to do cd and pwd - nothing more. Steven I did not get your response in time to try you suggestion but it was the permission that was the problem, if this happened again (which I hope not) I will try your suggestion. Thank you.
Bill Hassell
Honored Contributor

Re: URGENT - root lost execution permission

There's a possibility that permissions on / were changed...this can have catastrohpic effects on the whole system. I've seen security experts recommend changing / to 400 so no one can see, run or change anything in the / directory. And the expert was correct...


Bill Hassell, sysadmin