Computing.Net > Forums > Unix > SU from non-root without password

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SU from non-root without password

Reply to Message Icon

Name: tvc
Date: August 15, 2009 at 12:44:14 Pacific
OS: HP-UX
CPU/Ram: n/a
Product: 3com Superstack ii baseline switch
Subcategory: General
Comment:

I was checking to see if it was possible in Unix (Linux) to use SU to run a command as another user, without being asked a password ... but not starting from root.

It seems (logically) that only root can do exactly that, and on the net I find reference to SUDO. But, this tool is created for another user than root, to act as root. I don't need that, I only need the possibilty to SU without password. Other root rights, I don't need, and I don't want them, because it would be a security breach, in my case.

So, simple example, starting from "user1", I want to run a script, as "user2", and I don't want a password to be asked. I do need a password, for "user2", because I don't want to lower the level of protection for that user. ("user2" is a regular user used by people to login)

Do I really have to write a script, which someway or another reads the password of "user2", as "user1", and then run a given command ? Isn't there anything else out there ? I already have a password encryption/decryption system (a custom one), but it is not really very hard to break. But, it's enough to keep noobs out.



Sponsored Link
Ads by Google

Response Number 1
Name: jefro
Date: August 18, 2009 at 20:10:08 Pacific
Reply:

There are other authentication means. Password is only one way.

Dunno exactly what you are going for.

You could just add users to rights for the file or files. Make part of a group.

Playing to the angels
Les Paul (1915-2009)


0

Response Number 2
Name: tvc
Date: August 21, 2009 at 13:08:13 Pacific
Reply:

"You could just add users to rights for the file or files. Make part of a group."

Yes, but that sort of defeats the purpose. If you first make user A owner of a structure, to then let user B run scripts and executables of that structure (via group ownership) ... what's the purpose of owner A then ?

You might as well make 1 user owner of everything.

No, the idea is that I want to avoid having to use root, whilst still using the "su without password" feature, typical for root.

Wouldn't it be great, some sort of superuser, which can be super-user over a self-determined group of users.

And, because it's not root, not being able to do anything, like:

rm -rf /*


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: SU from non-root without password

Exit bash to root without exiting t www.computing.net/answers/unix/exit-bash-to-root-without-exiting-t/8283.html

expect problem (please help me) www.computing.net/answers/unix/expect-problem-please-help-me/5409.html

Unix root user password problem www.computing.net/answers/unix/unix-root-user-password-problem/3004.html