<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.2">
<TITLE>A new prompt at login time</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Courier New">        I ran up2date yesterday and have my system completely up to</FONT>
<BR><FONT SIZE=2 FACE="Courier New">date. I rebooted this morning and now when I login via telnet, yes that</FONT>
<BR><FONT SIZE=2 FACE="Courier New">is just plain old telnet, not ssh, I get the following:</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">======== </FONT>
<BR><FONT SIZE=2 FACE="Courier New">Red Hat Enterprise Linux AS release 4 (Nahant Update 2) </FONT>
<BR><FONT SIZE=2 FACE="Courier New">Kernel 2.6.9-22.ELsmp on an i686 </FONT>
<BR><FONT SIZE=2 FACE="Courier New">login: jca </FONT>
<BR><FONT SIZE=2 FACE="Courier New">Password: </FONT>
<BR><FONT SIZE=2 FACE="Courier New">Your default context is user_u:system_r:unconfined_t. </FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Do you want to choose a different one? [n] </FONT>
<BR><FONT SIZE=2 FACE="Courier New">======== </FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">I just entered a CR and thought this would be a one time things. But it</FONT>
<BR><FONT SIZE=2 FACE="Courier New">is not. While the prompt was being displayed I did a who and it does not</FONT>
<BR><FONT SIZE=2 FACE="Courier New">show me logged in yet. I did a ps -ef | grep log and see a login process</FONT>
<BR><FONT SIZE=2 FACE="Courier New">with the host name and -p option. So it appears the prompt is coming</FONT>
<BR><FONT SIZE=2 FACE="Courier New">from the login program or its calls to some PAM routine.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">        Does anybody know where this is controlled so I can set a</FONT>
<BR><FONT SIZE=2 FACE="Courier New">default and not be prompted each time? </FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">        Also exactly what is this controlling? </FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">        If I do id, it shows context=user_u:system_r:unconfined_t </FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Some things I have been able to find out and more questions.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">I did man -k context and discovered the get_default_context routine. Doing</FONT>
<BR><FONT SIZE=2 FACE="Courier New">man get_default_context tells me about get_default_context_list</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">       get_ordered_context_list queries the SE Linux policy database  in the</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       kernel  and  some  configuration files to determine an ordered list of</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       contexts that may be used for login sessions.  The list must be freed</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       with  freeconary.  The  possible  roles  and domains will be read from</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       /etc/security/default_contexts  and  .default_contexts  in  the home</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       directory of the user in question.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">My question now is what is the format of the files listed above?</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">       manual_user_enter_context allows the user to manually enter a context</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       as  a fallback if a list of authorized contexts could not be obtained.</FONT>
<BR><FONT SIZE=2 FACE="Courier New">       Caller must free via freecon.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">So I assume this is why I am getting prompted.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">I found default_contexts in /etc/selinux/targeted/contexts and it contains:</FONT>
</P>

<P>        <FONT SIZE=2 FACE="Courier New">system_r:unconfined_t   system_r:unconfined_t</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">I also found that if I removed the multiple option for pam_selinux.so, in remote located in /etc/pam.d, I do not get the prompt. So is this the correct place to correct this? That is the next time I run up2date and there is an update to remote is it going to get replaced and I will have to remove it again? Or is there another place that controls this that would be better to change.</FONT></P>

<P><FONT SIZE=2 FACE="Courier New">Thanks:</FONT>
<BR>        <FONT SIZE=2 FACE="Courier New">Jack Allen</FONT>
</P>
<BR>

</BODY>
</HTML>