HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the sudo file back.

 
Ravi22
Occasional Contributor

how to get the sudo file back.

HI,

Unfotunetely /usr/local/bin/sudo ,sudoedit permissions has changed. Due to this we are unable to get the "sudo" permissions. we have the 3 weeks o/s tape backup. we are tried to restore the file, same location. but it throughing the error "permissions denied".

I request to all , please give the solution , regarding this issue.
3 REPLIES

Re: how to get the sudo file back.

What are the current permissions and ownership of the two files? It has to have the SUID bit set and be owned by root.
If you restore it off of the tape as root, that should have fixed it.
Unless you use pax(1) without -p e, that refuses to restore those bits.
Ravi22
Occasional Contributor

Re: how to get the sudo file back.

The two files permissions is 777,777.Owned by root.

we restore at first time it is overwrite the same location. instated of sudo file it is usr(directort)inside local (directory) inside sudo file is prasented. This permissions also 777. And it is prasented in the binary format.we are able to see through strings sudo the out put is showing in zeros only.

Re: how to get the sudo file back.

>The two files permissions is 777,777, owned by root.

This is NOT good enough. They should not be writable at all and they need to have the SUID bit set:
chmod a-w,u+s

What tool(s) are you using to backup and restore?

What does this show:
ll -d /usr /usr/local /usr/local/bin /usr/local/bin/sudo /usr/local/bin/sudoedit