Skip to contentSkip to conversation

how to test ssh_sysadm_login(tunable)

DISCUSSION Jian Liu 3 participants 5 messages Dec 1, 2006 – Dec 3, 2006 SELinux security module

lore
Share & tools
lore

Jian Liu

author
#0 lore raw

In refpolicy, there is a global tunable named "ssh_sysadm_login". It means "Allow ssh logns as sysamd_r:sysadm_t".
How to use this tunable?

I have tested it on my lab, and find It is always allowed to "newrole -r sysadm_r -t sysadm_t" after sshed
to my test server, not mattering ssh_sysadm_login is on or off on the server.

I do not know whether my test method is fit to the tunable.

btw: on the test server after sshed

      [root@dell ~]# id -Z
      root:staff_r:staff_t

by Liu Jian
--------
email to: [email protected]

#1 lore raw
Quoted 8 lines · Jian Liu

In refpolicy, there is a global tunable named "ssh_sysadm_login". It means "Allow ssh logns as sysamd_r:sysadm_t".
How to use this tunable?

I have tested it on my lab, and find It is always allowed to "newrole -r sysadm_r -t sysadm_t" after sshed
to my test server, not mattering ssh_sysadm_login is on or off on the server.

That is the way it's designed.

The boolean in question determines whether you are permitted to ssh directly as sysadm_t, not whether you can run newrole after that.

Signature · 9 lines
[email protected]
http://etbe.blogspot.com/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development

--
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.
author
#2 lore raw
Quoted 12 lines · Russell Coker
Quoted 1 line · Jian Liu

In refpolicy, there is a global tunable named "ssh_sysadm_login". It

means

Quoted 7 lines

"Allow ssh logns as sysamd_r:sysadm_t".
How to use this tunable?

I have tested it on my lab, and find It is always allowed to "newrole -r sysadm_r -t sysadm_t" after sshed
to my test server, not mattering ssh_sysadm_login is on or off on the server.

Quoted 6 lines

That is the way it's designed.

The boolean in question determines whether you are permitted to ssh directly
as sysadm_t, not whether you can run newrole after that.

But, after "ssh_sysadm_login" is set to on, there is
not a login menu containing
"sysadm_r:sysadm_t". Moreover, when I use ssh , there is no any scontext select
menu as local login.

by Liu Jian
------------
email to: [email protected]

#3 lore raw

Hello Jian Liu,

Quoted 2 lines

But, after "ssh_sysadm_login" is set to on, there is not a login menu containing

I believe the role selection menu on login has been removed some time ago. It will log you into the first role you have access to. I think the file was default_contexts. So if you want to login as sysadm_r by default you need to change this file, otherwise use "newrole" to switch roles (which is not really more effort than the login menu)

I'm not sure about the rationale, but I could imagine some applications using ssh to login were confused by the extra prompt or so.

Just my vague memories, it might be completely off.

best regards,
Erich Schubert

Signature · 11 lines
     erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C    (o_
  There is no branch of mathematics, however abstract, which may not  //\
 some day be applied to phenomena of the real world. --- Lobatchevsky V_/_
             Es ist besser, geliebt und verloren zu haben,
                     als niemals geliebt zu haben.


--
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
Quoted 11 lines · Erich Schubert
Quoted 2 lines

But, after "ssh_sysadm_login" is set to on, there is not a login menu containing

I believe the role selection menu on login has been removed some time ago. It will log you into the first role you have access to. I think the file was default_contexts. So if you want to login as sysadm_r by default you need to change this file, otherwise use "newrole" to switch roles (which is not really more effort than the login menu)

I'm not sure about the rationale, but I could imagine some applications using ssh to login were confused by the extra prompt or so.

The PAM module used for /bin/login gave a prompt (if configured for it) and the sshd patch allowed logins of the form bar/staff_r@host to login to account "bar" with role "staff_r" on the host in question.

I plan to revive this for Debian.

Signature · 9 lines
[email protected]
http://etbe.blogspot.com/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development

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