Skip to contentSkip to conversation

cant SSH/Console Login and no deny/error messages

DISCUSSION Jeremiah Jahn 3 participants 5 messages Dec 26, 2007 – Jan 7, 2008 1 message not in the archive SELinux security module

lore
Share & tools
lore
#0 lore raw

I've trying to get SELinux strict up and running on a RHEL4-U4 box and not having much luck. I have one account and 3 programs that I need to protect from root. I was unable to get targeted to login under the user that I created, something about the policy always defaulting to user_u. So Fine, I tried to install the strict/ref policy from the tresys and cips. Dues to this being an x86_64 system, that didn't go well either. Trying plan C I went with the FC3 strict policy. Obviously some improvemtns have been made since then, but this was the first strict policy I was able to install without completely hosing my system. sshd and login seem to really like having libselinux(64) around.

So my question here has to possible answers:

1) where the heck can I find some rpms for RHEl4 -x86_64 and the most recent ref policy.

--OR--

2) what could possibly be causing no [avc denied] messages to be logged. Most of the messages I have used with audit2allow to to try and get everything to work. Finally I go to the point of having no more messages even when rebooting the machine. If I put things into passive mode still no more messages, this is with constant reloading of the policy to clear the avc cache.

help please.

"A fractal is by definition a set for which the Hausdorff Besicovitch dimension strictly exceeds the topological dimension." -- Mandelbrot, "The Fractal Geometry of Nature"

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Although that did produce a number of additional deny messages, even allowing all of them, still does not allow me to login from the console or ssh. doesn't matter if I'm root a standard user or a selinux user.

Does any one know of a simple way to get RHEL4 targeted to recognize se users? I can't quite figure out where they are setting the default domain transition. Like I said before, I just need to keep root away from a few programs and a data file. I've set up a type and a user, relabled the fs with the new types etc etc. added my user to users, it matches the name in /etc/passwd exactly.

I think I generally understand whats going on, I think I'm just suffering from use of an out of date tool chain.

Quoted 57 lines · Justin Mattock

Hello I think you need to; make enableaudit in the policy. with selinux-policy-default the location would be /etc/selinux/src with refpolicy-strict I'm not too sure.
regards;
--Justin P. Mattock
On Dec 26, 2007 1:35 PM, Jeremiah Jahn <[email protected]> wrote:
I've trying to get SELinux strict up and running on a RHEL4-U4 box and
not having much luck. I have one account and 3 programs that I need to
protect from root. I was unable to get targeted to login under the user
that I created, something about the policy always defaulting to user_u.
So Fine, I tried to install the strict/ref policy from the tresys and
cips. Dues to this being an x86_64 system, that didn't go well either.
Trying plan C I went with the FC3 strict policy. Obviously some
improvemtns have been made since then, but this was the first strict
policy I was able to install without completely hosing my system. sshd
and login seem to really like having libselinux(64) around.

So my question here has to possible answers:

1) where the heck can I find some rpms for RHEl4 -x86_64 and the most
recent ref policy.

--OR--

2) what could possibly be causing no [avc denied] messages to be logged.
Most of the messages I have used with audit2allow to to try and get
everything to work. Finally I go to the point of having no more messages
even when rebooting the machine. If I put things into passive mode
still no more messages, this is with constant reloading of the policy to
clear the avc cache.

help please.

Quoted 6 lines

"A fractal is by definition a set for which the Hausdorff Besicovitch
dimension strictly exceeds the topological dimension." -- Mandelbrot,
"The Fractal Geometry of Nature"

A fool-proof method for sculpting an elephant: first, get a huge block of marble; then you chip away everything that doesn't look like an elephant.

#3 lore raw
Quoted 13 lines · Jeremiah Jahn

Although that did produce a number of additional deny messages, even allowing all of them, still does not allow me to login from the console or ssh. doesn't matter if I'm root a standard user or a selinux user.

Does any one know of a simple way to get RHEL4 targeted to recognize se users? I can't quite figure out where they are setting the default domain transition. Like I said before, I just need to keep root away from a few programs and a data file. I've set up a type and a user, relabled the fs with the new types etc etc. added my user to users, it matches the name in /etc/passwd exactly.

Quoted 2 lines

I think I generally understand whats going on, I think I'm just suffering from use of an out of date tool chain.

Without an updated toolchain, seusers will not work. You have to add selinux users to the policy that match the linux username. That will determine the set of the roles for the user just like seusers does now.

Quoted 67 lines · Justin Mattock
Quoted 57 lines

Hello I think you need to; make enableaudit in the policy. with selinux-policy-default the location would be /etc/selinux/src with refpolicy-strict I'm not too sure.
regards;
--Justin P. Mattock
On Dec 26, 2007 1:35 PM, Jeremiah Jahn <[email protected]> wrote:
I've trying to get SELinux strict up and running on a RHEL4-U4 box and
not having much luck. I have one account and 3 programs that I need to
protect from root. I was unable to get targeted to login under the user
that I created, something about the policy always defaulting to user_u.
So Fine, I tried to install the strict/ref policy from the tresys and
cips. Dues to this being an x86_64 system, that didn't go well either.
Trying plan C I went with the FC3 strict policy. Obviously some
improvemtns have been made since then, but this was the first strict
policy I was able to install without completely hosing my system. sshd
and login seem to really like having libselinux(64) around.

So my question here has to possible answers:

1) where the heck can I find some rpms for RHEl4 -x86_64 and the most
recent ref policy.

--OR--

2) what could possibly be causing no [avc denied] messages to be logged.
Most of the messages I have used with audit2allow to to try and get
everything to work. Finally I go to the point of having no more messages
even when rebooting the machine. If I put things into passive mode
still no more messages, this is with constant reloading of the policy to
clear the avc cache.

help please.

Quoted 6 lines

"A fractal is by definition a set for which the Hausdorff Besicovitch
dimension strictly exceeds the topological dimension." -- Mandelbrot,
"The Fractal Geometry of Nature"

A fool-proof method for sculpting an elephant: first, get a huge block of marble; then you chip away everything that doesn't look like an elephant.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
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.
#4 lore raw
In reply to Jeremiah Jahn
Quoted 12 lines · Jeremiah Jahn

I've trying to get SELinux strict up and running on a RHEL4-U4 box and not having much luck. I have one account and 3 programs that I need to protect from root. I was unable to get targeted to login under the user that I created, something about the policy always defaulting to user_u. So Fine, I tried to install the strict/ref policy from the tresys and cips. Dues to this being an x86_64 system, that didn't go well either. Trying plan C I went with the FC3 strict policy. Obviously some improvemtns have been made since then, but this was the first strict policy I was able to install without completely hosing my system. sshd and login seem to really like having libselinux(64) around.

Quoted 4 lines

So my question here has to possible answers:

1) where the heck can I find some rpms for RHEl4 -x86_64 and the most recent ref policy.

I don't know of any 64bit RHEL4 RPMs. The refpolicy page has an RPM, but its for the complete source; I presume you're asking for a compiled policy, which we don't have.

Quoted 6 lines

2) what could possibly be causing no [avc denied] messages to be logged. Most of the messages I have used with audit2allow to to try and get everything to work. Finally I go to the point of having no more messages even when rebooting the machine. If I put things into passive mode still no more messages, this is with constant reloading of the policy to clear the avc cache.

Perms that are denied by DAC (regular linux perms) don't produce messages. DAC is checked before MAC (SELinux), so if something is denied by DAC, it never gets to the MAC check.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
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.
#5 lore raw
In reply to Jeremiah Jahn
Quoted 12 lines · Jeremiah Jahn

I've trying to get SELinux strict up and running on a RHEL4-U4 box and not having much luck. I have one account and 3 programs that I need to protect from root. I was unable to get targeted to login under the user that I created, something about the policy always defaulting to user_u. So Fine, I tried to install the strict/ref policy from the tresys and cips. Dues to this being an x86_64 system, that didn't go well either. Trying plan C I went with the FC3 strict policy. Obviously some improvemtns have been made since then, but this was the first strict policy I was able to install without completely hosing my system. sshd and login seem to really like having libselinux(64) around.

Quoted 4 lines

So my question here has to possible answers:

1) where the heck can I find some rpms for RHEl4 -x86_64 and the most recent ref policy.

I think what some people do is to install the latest SELinux userland into a private directory (rather than overwriting the RHEL4 provided ones), and then when building policy, set PATH and LD_LIBRARY_PATH to refer to that private directory, and configure semanage.conf to generate the kernel policy version supported by the RHEL4 kernel. That lets them use e.g. modular policy, semanage, etc for managing policy, without breaking dependencies of RHEL4 userland on the old libselinux for other things.

We don't provide binary rpms of the SELinux userland, only source tarballs.

Quoted 10 lines

--OR--

2) what could possibly be causing no [avc denied] messages to be logged. Most of the messages I have used with audit2allow to to try and get everything to work. Finally I go to the point of having no more messages even when rebooting the machine. If I put things into passive mode still no more messages, this is with constant reloading of the policy to clear the avc cache.

help please.

There is the 'make clean enableaudit load' trick to remove all dontaudit statements from the policy.

There are also certain denials that aren't audited at all in the RHEL4 kernel due to implementation issues that have since been resolved in later kernels (such as the one used in RHEL5). In particular, capability checks on netlink messages.

Having gone down this path myself before, I recall one problem with using the FC3 strict policy for RHEL4 was the introduction of the audit system in RHEL4, leading to a requirement for the audit_write and/or audit_control capabilities for all login-related programs. I had to back port those changes from a later version of the example policy. But you likely are better off using the refpolicy with build.conf DISTRO set to rhel4 as your starting point than the FC3 strict policy.

Signature · 8 lines
Stephen Smalley
National Security Agency


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