LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-28-2008, 04:33 AM   #1
G4tsu
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Rep: Reputation: 0
su and pam


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.

Thanks very much to all of you that will help me.
 
Old 07-28-2008, 04:59 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It's double stupid, since root doesn't need a password to su to any user, so you'll be able to su to root then su to any user without a password.

Even if you could set it up, hoe could you stop someone as root reversing any changes you'd made?

And yes, the basic idea is incredibly stupid too
 
Old 07-28-2008, 05:42 AM   #3
G4tsu
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Thx for your help and support, you was very useful. You confirmed its a stupid policy and your contribute was nothing.

I must repeat myself:
"I KNOW IT'S STUPID, JUST HELP ME DOING THIS", if you are able and kind enough.

By the way root does not need a passwd to su someone in the default settings, but I am sure you can edit the stack to ask a password even to root.

Of course root could just undo those changes, but pls, IGNORE THIS PROBLEM.

Thank you.

Last edited by G4tsu; 07-28-2008 at 05:44 AM.
 
Old 07-28-2008, 05:50 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Why? To waste my time too? Not likely
 
Old 07-28-2008, 07:01 AM   #5
G4tsu
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Original Poster
Rep: Reputation: 0
You are already wasting your time, and sounds incredibly stupid to post just to say "I don't want to waste my time posting".

Try to avoid threads you are not interested in.
 
Old 07-28-2008, 08:33 AM   #6
KasMage
LQ Newbie
 
Registered: Jul 2008
Location: Indiana
Distribution: Mandriva 2008.1
Posts: 21

Rep: Reputation: 15
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
 
Old 07-28-2008, 08:57 AM   #7
G4tsu
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Thank you for the contribute.

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.

Last edited by G4tsu; 07-28-2008 at 09:01 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd + pam + virtual users - Pam cannot load database file. mdkelly069 Linux - Networking 3 09-22-2004 11:07 PM
PAM help manya Linux - Security 1 05-10-2004 09:39 AM
About the PAM ust Linux - General 0 12-31-2003 03:33 AM
Pam Tinkster Slackware 7 07-03-2003 06:48 PM
Pam Mephisto Slackware 1 01-22-2003 02:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration