Gentoo Archives: gentoo-hardened

From: Chris PeBenito <pebenito@g.o>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] semanage - ldap problem ?
Date: Tue, 31 Jul 2007 13:20:10
Message-Id: 1185887814.5062.22.camel@defiant.pebenito.net
In Reply to: [gentoo-hardened] semanage - ldap problem ? by julien.thomas@enst-bretagne.fr
1 On Tue, 2007-07-31 at 11:43 +0200, julien.thomas@×××××××××××××.fr wrote:
2 > Hi.
3 > An a test implementation of SeLinux, I've tried to
4 > create a special account, admin, which should have right over the different
5 > severs of our tests.
6 >
7 > After classical configurations, I've tested the SeLinux part and I
8 > have problem with the semanage tool or at least the linux user mapping
9 > for this account,
10 > managed by pam-ldap :
11 >
12 > I want to give this account a sysadmin role so a mapping to sysadm_u with
13 >
14 > semanage login -a -s sysadm_u admin
15 >
16 > which result in the messages file by
17 > Jul 31 11:09:53 mv4 python: Successful: modify selinux user mapping
18 > name=admin
19 > sename=sysadm_u old_sename=sysadm_u
20 >
21 >
22 > mv4 ~ # semanage login -l
23 >
24 > Login Name SELinux User
25 >
26 > __default__ user_u
27 > admin sysadm_u
28 > root root
29 > system_u system_u
30 >
31 > mv4 ~ # semanage user -l
32 > SELinux User SELinux Roles
33 >
34 > root sysadm_r staff_r
35 > staff_u sysadm_r staff_r
36 > sysadm_u sysadm_r
37 > system_u system_r
38 > user_u user_r
39 >
40 > However, when I open a ssh connexion on the server, with this admin
41 > account, I still have a user_u:: context and, quite obviously a
42 > newrole -r sysadm_r is refused.
43 >
44 >
45 > admin@mv1 ~ $ secon
46 > user: user_u
47 > role: user_r
48 > type: user_t
49 > sensitivity:
50 > clearance:
51 > mls-range:
52 >
53 > However, with a direct identification on the server, I do not have any problem
54 >
55 >
56 > May be the problem is similar to the fact that upon connecting on the
57 > server directly with the root account, I have a context confirmation
58 > to perform while with a ssh connexion, the context is set to staff_r ?
59 >
60 > I also have to precised that the seLinux context (sestatus -v) match
61 > the default context, as checked in the section "Trouble Logging in
62 > remotely"
63
64 You need to turn on the ssh_sysadm_login if you want to ssh in as
65 sysadm_r.
66
67 --
68 Chris PeBenito
69 <pebenito@g.o>
70 Developer,
71 Hardened Gentoo Linux
72
73 Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
74 Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243

Attachments

File name MIME type
signature.asc application/pgp-signature