Skip to contentSkip to conversation

Changing the default role/type of a user

DISCUSSION Brad Chapman 2 participants 4 messages Aug 19, 2002 – Aug 20, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Everyone,

In my policy, my username of Brad is placed in the role user_r and the domain user_t. However, the login program has my username in the role sysadm_r and the domain sysadm_t, despite there being no such role configured in the users file. Why does the login program do this?

Thanks,

Brad

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 4 lines · Brad Chapman

In my policy, my username of Brad is placed in the role user_r and the domain user_t. However, the login program has my username in the role sysadm_r and the domain sysadm_t, despite there being no such role configured in the users file. Why does the login program do this?

It sounds like it's set to that in /etc/security/default_context .

Although if the policy doesn't permit this then login should not be allowed to do it. Are you running in permissive mode?

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 10 lines · --- Russell Coker
Quoted 4 lines · Brad Chapman

In my policy, my username of Brad is placed in the role user_r and the domain user_t. However, the login program has my username in the role sysadm_r and the domain sysadm_t, despite there being no such role configured in the users file. Why does the login program do this?

It sounds like it's set to that in /etc/security/default_context .

Although if the policy doesn't permit this then login should not be allowed to do it. Are you running in permissive mode?

Yes, but when I try to login with Brad:sysadm_r:sysadm_t, it fails, since I don't have that role in the list in the users file; AAR, it complains that there's no SID for it. So I enter user_r and user_t for my role/type, which IS in the users file, and it logs in happily.

I am using permissive mode right now, because I want to be absolutely sure that the parts of the policy which apply to what I do are foolproof. My su_macros and user_macros files are growing again, but otherwise my (or your) policy is quite well set up, IMO.

Brad

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw
Quoted 7 lines · Brad Chapman
Quoted 7 lines
Quoted 4 lines

In my policy, my username of Brad is placed in the role user_r and the domain user_t. However, the login program has my username in the role sysadm_r and the domain sysadm_t, despite there being no such role configured in the users file. Why does the login program do this?

It sounds like it's set to that in /etc/security/default_context .

Quoted 7 lines
Quoted 2 lines

Although if the policy doesn't permit this then login should not be allowed to do it. Are you running in permissive mode?

Yes, but when I try to login with Brad:sysadm_r:sysadm_t, it fails, since I don't have that role in the list in the users file; AAR, it complains that there's no SID for it. So I enter user_r and user_t for my role/type, which IS in the users file, and it logs in happily.

So change the /etc/security/default_context to have Brad:user_r:user_t and everything should be fine.

Quoted 4 lines

I am using permissive mode right now, because I want to be absolutely sure that the parts of the policy which apply to what I do are foolproof. My su_macros and user_macros files are growing again, but otherwise my (or your) policy is quite well set up, IMO.

There is no reason for su_macros to grow unless you use other forms of authentication than /etc/shadow, in which case the correct thing to do is add rules for the "auth" attribute which affect su and all other programs that do authentication.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.