Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

SELinux without PAM: stuck in local_login_t context.

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
trainz-are-kul
n00b
n00b
Posts: 13
Joined: Mon Jun 25, 2018 7:46 am

SELinux without PAM: stuck in local_login_t context.

  • Quote

Post by trainz-are-kul » Sat Jun 17, 2023 7:17 am

Hello,

I was following the Gentoo Wiki page for SELinux/Installation, however I can not get the user contexts to work properly, much like this post, which seems to imply that PAM is responsible for setting the contexts after login (which my system does not have).

Is PAM a requirement for user contexts to work properly? Installing PAM fixes this.

NOTE: I can manually use

Code: Select all

 runcon -u sysadm_u -r sysadm_r -t sysadm_t bash 
to run bash and get rid of the

Code: Select all

Failed to set new SELinux execution context. Is your current SELinux context allowed to run Portage?
warning.

Code: Select all

 $ id -Z
system_u:system_r:local_login_t

Code: Select all

 # id -Z
system_u:system_r:local_login_t

Code: Select all

 # sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              disabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33

Code: Select all

 # semanage login -l 

Login Name                SELinux User             

__default__               unconfined_u             
<user>                       staff_u                  

Code: Select all

 # semanage user -l
SELinux User    SELinux Roles

root            staff_r sysadm_r system_r
staff_u         staff_r sysadm_r system_r
sysadm_u        sysadm_r
system_u        system_r
unconfined_u    unconfined_r
user_u          user_r
Top
Thistled
Guru
Guru
User avatar
Posts: 572
Joined: Thu Jan 06, 2011 6:57 pm
Location: Scotland
Contact:
Contact Thistled
Website

  • Quote

Post by Thistled » Sat Jul 01, 2023 11:21 pm

Are you saying installing PAM fixes this?
If so, then why not install PAM?
Whatever you do, do it properly!
Top
Post Reply

2 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy