Skip to contentSkip to conversation

pam_selinux.so question

DISCUSSION Thorsten Sauter 2 participants 2 messages Apr 14, 2004 – Apr 15, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi all,

I have installed a fresh Debian Sid system (powerpc) and compiled my own 2.6.5 (vanilla kernel) with selinux support.

All required packages for selinux are installed (simply rebuild the debian packages).

But now, I have a mysterious behavior with the pam_selinux.so module, which is required in /etc/pam.d/login.

If I login as root I got the normal info text:
"Your default context is root:sysadm_r:sysadm_t." [...]

But as soon as I try this as an normal user I got a new question:
"Would you like to enter a security context? [y]"

Hitting "n" will end with an "authentication failure" and logout this user.
Using "y" and insering user_r/user_t will help, and allow the user to login.

But why I get this "manual" question?

Tia
Thorsten

p.s. System is not in enforceing mode

<snip /etc/security/default_contexts> system_r:local_login_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t </snip>

<snip /etc/selinux/users>
user sar roles { user_r staff_r };
</snip>

Signature · 10 lines
Thorsten Sauter
<[email protected]>

				(Is there life after /sbin/halt -p?)


--
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 15 lines · Thorsten Sauter

I have installed a fresh Debian Sid system (powerpc) and compiled my own 2.6.5 (vanilla kernel) with selinux support.

All required packages for selinux are installed (simply rebuild the debian packages).

But now, I have a mysterious behavior with the pam_selinux.so module, which is required in /etc/pam.d/login.

If I login as root I got the normal info text:
"Your default context is root:sysadm_r:sysadm_t." [...]

But as soon as I try this as an normal user I got a new question:
"Would you like to enter a security context? [y]"

Quoted 6 lines

Hitting "n" will end with an "authentication failure" and logout this user.
Using "y" and insering user_r/user_t will help, and allow the user to login.

But why I get this "manual" question?

My guess is that you have not labeled your filesystem. pam_selinux.so seems to behave this way if it can't find any labels on the fs. If you do a "make reload relabel" and reboot, it should work.

HTH,
Thomas

--
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.