Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: tvc
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.

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)

"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 /*

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |