All of lore.kernel.org
 help / color / mirror / Atom feed
* No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
@ 2010-02-23 16:14 Denis BUCHER
  2010-02-23 16:29 ` Stephen Smalley
  2010-02-23 17:16 ` Daniel J Walsh
  0 siblings, 2 replies; 5+ messages in thread
From: Denis BUCHER @ 2010-02-23 16:14 UTC (permalink / raw)
  To: selinux

Dear all,

I got the following error while I just wanted to change the homedir of a 
user. I hope it's the right place to ask ? (Nothing found on the web)

# usermod -d <path> <user>

/usr/sbin/genhomedircon: [Errno 2] No such file or directory: 
'/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
usermod: warning: unable to relabel the homedir (...)

But homedir was changed anyway...

Just to let you know... (?)

Denis

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
  2010-02-23 16:14 No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs' Denis BUCHER
@ 2010-02-23 16:29 ` Stephen Smalley
  2010-02-23 17:36   ` Denis BUCHER
  2010-02-23 17:16 ` Daniel J Walsh
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Smalley @ 2010-02-23 16:29 UTC (permalink / raw)
  To: Denis BUCHER; +Cc: selinux

On Tue, 2010-02-23 at 17:14 +0100, Denis BUCHER wrote:
> Dear all,
> 
> I got the following error while I just wanted to change the homedir of a 
> user. I hope it's the right place to ask ? (Nothing found on the web)
> 
> # usermod -d <path> <user>
> 
> /usr/sbin/genhomedircon: [Errno 2] No such file or directory: 
> '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
> usermod: warning: unable to relabel the homedir (...)
> 
> But homedir was changed anyway...
> 
> Just to let you know... (?)

If you are using Fedora, then this would be best directed to
selinux@lists.fedoraproject.org (formerly
fedora-selinux-list@redhat.com).

It would help to identify your distribution, shadow-utils version,
SELinux status (sestatus), etc.

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
  2010-02-23 16:14 No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs' Denis BUCHER
  2010-02-23 16:29 ` Stephen Smalley
@ 2010-02-23 17:16 ` Daniel J Walsh
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel J Walsh @ 2010-02-23 17:16 UTC (permalink / raw)
  To: Denis BUCHER; +Cc: selinux

On 02/23/2010 11:14 AM, Denis BUCHER wrote:
> Dear all,
>
> I got the following error while I just wanted to change the homedir of 
> a user. I hope it's the right place to ask ? (Nothing found on the web)
>
> # usermod -d <path> <user>
>
> /usr/sbin/genhomedircon: [Errno 2] No such file or directory: 
> '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
> usermod: warning: unable to relabel the homedir (...)
>
> But homedir was changed anyway...
>
> Just to let you know... (?)
>
> Denis
>
> -- 
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to 
> majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
>
>
Do you have SELinux enabled?  Does the entire path exists?
/etc/selinux/targeted/contexts/files


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
  2010-02-23 16:29 ` Stephen Smalley
@ 2010-02-23 17:36   ` Denis BUCHER
  2010-02-23 18:05     ` Stephen Smalley
  0 siblings, 1 reply; 5+ messages in thread
From: Denis BUCHER @ 2010-02-23 17:36 UTC (permalink / raw)
  To: Stephen Smalley, Daniel J Walsh; +Cc: selinux

Dear Stephen, Dear Daniel,

Le 23.02.2010 17:29, Stephen Smalley a écrit :
>> # usermod -d<path>  <user>
>>
>> /usr/sbin/genhomedircon: [Errno 2] No such file or directory:
>> '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
>> usermod: warning: unable to relabel the homedir (...)
>>
>> But homedir was changed anyway...
>>
>> Just to let you know... (?)
>
> If you are using Fedora, then this would be best directed to
> selinux@lists.fedoraproject.org (formerly
> fedora-selinux-list@redhat.com).

Yes, in fact the error came only once and the change was commited 
anyway, therefore it's more by curiosity than a real problem, but I 
think it's always better to be sure ;-)

> It would help to identify your distribution, shadow-utils version,
> SELinux status (sestatus), etc.

I am using CentOS (for the first time, choice of our provider).
CentOS 5.4

# uname -a
Linux (server) 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 
x86_64 x86_64 GNU/Linux

Installed Packages
Name       : shadow-utils
Arch       : x86_64
Epoch      : 2
Version    : 4.0.17
Release    : 14.el5

# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          disabled
Policy version:                 21
Policy from config file:        targeted

Le 23.02.2010 18:16, Daniel J Walsh a écrit :
 > Do you have SELinux enabled? Does the entire path exists?
 > /etc/selinux/targeted/contexts/files

# find /etc/selinux/targeted/contexts/
/etc/selinux/targeted/contexts/
/etc/selinux/targeted/contexts/netfilter_contexts

Sorry I know it looks strange but I am customising the server as 
installed by the provider and in the past I never used SELinux...

Thanks a lot for your help :-) (And hope it will help others some day 
too...)

Denis

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
  2010-02-23 17:36   ` Denis BUCHER
@ 2010-02-23 18:05     ` Stephen Smalley
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Smalley @ 2010-02-23 18:05 UTC (permalink / raw)
  To: Denis BUCHER; +Cc: Daniel J Walsh, selinux

On Tue, 2010-02-23 at 18:36 +0100, Denis BUCHER wrote:
> Dear Stephen, Dear Daniel,
> 
> Le 23.02.2010 17:29, Stephen Smalley a écrit :
> >> # usermod -d<path>  <user>
> >>
> >> /usr/sbin/genhomedircon: [Errno 2] No such file or directory:
> >> '/etc/selinux/targeted/contexts/files/file_contexts.homedirs'
> >> usermod: warning: unable to relabel the homedir (...)
> >>
> >> But homedir was changed anyway...
> >>
> >> Just to let you know... (?)
> >
> > If you are using Fedora, then this would be best directed to
> > selinux@lists.fedoraproject.org (formerly
> > fedora-selinux-list@redhat.com).
> 
> Yes, in fact the error came only once and the change was commited 
> anyway, therefore it's more by curiosity than a real problem, but I 
> think it's always better to be sure ;-)
> 
> > It would help to identify your distribution, shadow-utils version,
> > SELinux status (sestatus), etc.
> 
> I am using CentOS (for the first time, choice of our provider).
> CentOS 5.4
> 
> # uname -a
> Linux (server) 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 
> x86_64 x86_64 GNU/Linux
> 
> Installed Packages
> Name       : shadow-utils
> Arch       : x86_64
> Epoch      : 2
> Version    : 4.0.17
> Release    : 14.el5
> 
> # sestatus
> SELinux status:                 enabled
> SELinuxfs mount:                /selinux
> Current mode:                   permissive
> Mode from config file:          disabled
> Policy version:                 21
> Policy from config file:        targeted

That looks very odd - you have SELinux status:  enabled but Mode from
config file:  disabled?  Did you just modify /etc/selinux/config after
booting?

> Le 23.02.2010 18:16, Daniel J Walsh a écrit :
>  > Do you have SELinux enabled? Does the entire path exists?
>  > /etc/selinux/targeted/contexts/files
> 
> # find /etc/selinux/targeted/contexts/
> /etc/selinux/targeted/contexts/
> /etc/selinux/targeted/contexts/netfilter_contexts
> 
> Sorry I know it looks strange but I am customising the server as 
> installed by the provider and in the past I never used SELinux...
> 
> Thanks a lot for your help :-) (And hope it will help others some day 
> too...)

Looks like you don't have a policy installed?
rpm -q selinux-policy-targeted

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-23 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-23 16:14 No such file or directory: '/etc/selinux/targeted/contexts/files/file_contexts.homedirs' Denis BUCHER
2010-02-23 16:29 ` Stephen Smalley
2010-02-23 17:36   ` Denis BUCHER
2010-02-23 18:05     ` Stephen Smalley
2010-02-23 17:16 ` Daniel J Walsh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.