Discussion:
Default User in Selinux
Aman Sharma
2017-11-29 11:49:51 UTC
Permalink
Hi All,

During System boot up, I am running some semanage commands to change the
User to sysadm_u. But in Cent OS 7.3 , Below error message is coming
i.e. *ValueError:
Login mapping for __default__ is not defined.*

/usr/sbin/semanage login -m -S targeted -s user_u -r s0 __default__
ValueError: Login mapping for __default__ is not defined


But the same command is working fine in Cent OS 6.8.

Please let me know why this error message is coming for Cent OS 7.
--
Thanks
Aman
Cell: +91 9990296404 | Email ID : ***@gmail.com
Stephen Smalley
2017-11-29 13:56:47 UTC
Permalink
Post by Aman Sharma
Hi All,
During System boot up, I am running some semanage commands to change
the User to sysadm_u.  But in Cent OS 7.3 , Below error message is
coming i.e.  ValueError: Login mapping for __default__ is not
defined.
/usr/sbin/semanage login -m -S targeted -s user_u -r s0
__default__                
    ValueError: Login mapping for __default__ is not defined
But the same command is working fine in Cent OS 6.8. 
Please let me know why this error message is coming for Cent OS 7.
That suggests something is very wrong with your seusers configuration,
or maybe you have too many underscores before or after default (should
be two _ before and after).

You can delete all local customizations to your seusers configuration
via semanage login -D. This will revert to the stock configuration in
your policy package. Likewise for semanage user -D.
Stephen Smalley
2017-11-29 14:20:50 UTC
Permalink
Post by Stephen Smalley
Post by Aman Sharma
Hi All,
During System boot up, I am running some semanage commands to change
the User to sysadm_u.  But in Cent OS 7.3 , Below error message is
coming i.e.  ValueError: Login mapping for __default__ is not
defined.
/usr/sbin/semanage login -m -S targeted -s user_u -r s0
__default__                
    ValueError: Login mapping for __default__ is not defined
But the same command is working fine in Cent OS 6.8. 
Please let me know why this error message is coming for Cent OS 7.
That suggests something is very wrong with your seusers
configuration,
or maybe you have too many underscores before or after default
(should
be two _ before and after).
BTW, the command above works fine for me on CentOS 7.4 (don't have 7.3
handy).
Post by Stephen Smalley
You can delete all local customizations to your seusers configuration
via semanage login -D.  This will revert to the stock configuration
in
your policy package.  Likewise for semanage user -D.
Aman Sharma
2017-11-29 14:44:27 UTC
Permalink
Hi Stephen,

During boot up,this error message is coming i.e. command is not working but
after the system boot up, this command is working fine.

Means facing the issue during boot up.

Please let me know your comments on this.

Thanks
Aman
Post by Stephen Smalley
Post by Stephen Smalley
Post by Aman Sharma
Hi All,
During System boot up, I am running some semanage commands to change
the User to sysadm_u. But in Cent OS 7.3 , Below error message is
coming i.e. ValueError: Login mapping for __default__ is not
defined.
/usr/sbin/semanage login -m -S targeted -s user_u -r s0
__default__
ValueError: Login mapping for __default__ is not defined
But the same command is working fine in Cent OS 6.8.
Please let me know why this error message is coming for Cent OS 7.
That suggests something is very wrong with your seusers
configuration,
or maybe you have too many underscores before or after default (should
be two _ before and after).
BTW, the command above works fine for me on CentOS 7.4 (don't have 7.3
handy).
Post by Stephen Smalley
You can delete all local customizations to your seusers configuration
via semanage login -D. This will revert to the stock configuration in
your policy package. Likewise for semanage user -D.
--
Thanks
Aman
Cell: +91 9990296404 | Email ID : ***@gmail.com
Continue reading on narkive:
Loading...