Skip to contentSkip to conversation

id -Z causing some problem

DISCUSSION Preeti Malakar 2 participants 2 messages Jul 14, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

Sir,
When i am the root and issuing the command id -Z <username> why am i
getting the following message? but SELinux is enabled

[root@pryber /]# id preeti
uid=500(preeti) gid=500(preeti) groups=500(preeti)
[root@pryber /]# id -Z preeti
id: cannot display context when selinux not enabled or when displaying the id of a different user
[root@pryber /]# cat /selinux/enforce
1

regards

Signature · 9 lines
PREETI MALAKAR
M.TECH 2nd YR CSE
IIT GUWAHATI


--
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.
#1 lore raw
Quoted 10 lines · Preeti Malakar

When i am the root and issuing the command id -Z <username> why am i
getting the following message? but SELinux is enabled

[root@pryber /]# id preeti
uid=500(preeti) gid=500(preeti) groups=500(preeti)
[root@pryber /]# id -Z preeti
id: cannot display context when selinux not enabled or when displaying the id of a different user
[root@pryber /]# cat /selinux/enforce
1

I'm not much of an SELinux expert yet, but I think you'll find your question is answered in the second part of sthe error msg:
'or when displaying the id of a different user'.

Does 'id -Z' instead of 'id -Z preeti' work?

Because there is no real tie between unix (/etc/passwd) users and SELinux users, and even if there were the role/domain are dependent on context, it's not evem theoretically possible for the system to give an unambiguous answer.

Regards,
Tobias Nijweide

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