Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
I need your help.
I need "su" to ask for password only when you are trying to NOT become root.
That means all can be root, but if you are tring to become another user (and precisely a user who belongs to a certain group) you need his password.
I know it can seem silly (once you are root you can do everything), just help me doing this, it's not a choise of mine.
I think I would need some sort of logic within the pam stack, I need to obtain su arguments in order to see what kind of user you are trying to become, and I really don't know how to do this.
The purpose of this site is to help people with issues in Linux as much as possible. Even if somebody helps you to solve this problem, he or she really won't be helping you much at all. What you're attempting to do is completely paradoxical. You're essentially trying to create unlimited accounts with limited permissions. But what the hey; I'll throw an idea into the hat.
You could modify 'sudo' so as to only allow the 'su -l root' command to be run from it.
Last edited by KasMage; 07-28-2008 at 08:35 AM.
Reason: Italics code
At this point I want to give more explanations about the choice.
As I told, it's not mine, the owner of the system (a distributed system) wish so.
Here all users should be administrator (this guy see it from a Microsoft point of view) able to perform every operation on the system. They are trusted. Anyway only root can do some stuff, so all should be able to su root at will. This is easily done.
The owner anyway disklike the fact that any user now can impersonate anyone else... He knows that if anyone can be root anyone could do everything... But as a compromise he wishes this kind of solution.. he wants su command to works only towards root. I told him it's stupid, but for now, he wants his system to work this way, cause he is sure that users anyway will not try to edit system files.
I am not really interested about it, I need only to get su's arguments within pam stack, but I am not able.
If you know how to do it, thank you, if you know a better policy to allow ANYONE to do ANYWHAT except stealing identity you are welcome too.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.