Bug 869349 - SELinux is preventing /usr/sbin/userdel from 'read' accesses on the directory /home/riccardo.
SELinux is preventing /usr/sbin/userdel from 'read' accesses on the directory...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:3af1ef2e56581af7e3bac031abc...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 12:07 EDT by Riccardo Angelino
Modified: 2012-10-24 12:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-24 12:11:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-10-23 12:07 EDT, Riccardo Angelino
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-10-23 12:07 EDT, Riccardo Angelino
no flags Details

  None (edit)
Description Riccardo Angelino 2012-10-23 12:07:21 EDT
Additional info:
libreport version: 2.0.16
kernel:         3.6.2-4.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/userdel from 'read' accesses on the directory /home/riccardo.
:
:*****  Plugin restorecon (82.4 confidence) suggests  *************************
:
:If si desidera sistemare l'etichetta. 
:L'etichetta predefinita di /home/riccardo dovrebbe essere user_home_dir_t.
:Then è possibile avviare restorecon.
:Do
:# /sbin/restorecon -v /home/riccardo
:
:*****  Plugin file (7.05 confidence) suggests  *******************************
:
:If si pensa che la causa sia una macchina con etichetta errata.
:Then è necessaria una completa rietichettatura.
:Do
:touch /.autorelabel; reboot
:
:*****  Plugin file (7.05 confidence) suggests  *******************************
:
:If si pensa che la causa sia una macchina con etichetta errata.
:Then è necessaria una completa rietichettatura.
:Do
:touch /.autorelabel; reboot
:
:*****  Plugin catchall_labels (4.59 confidence) suggests  ********************
:
:If you want to allow userdel to have read access on the riccardo directory
:Then e' necessario modificare l'etichetta su /home/riccardo
:Do
:# semanage fcontext -a -t TIPO_FILE '/home/riccardo'
:dove TIPO_FILE è uno dei seguenti: pcscd_var_run_t, inotifyfs_t, file_context_t, sysctl_kernel_t, home_root_t, device_t, etc_t, abrt_t, lib_t, selinux_config_t, root_t, usr_t, net_conf_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, device_t, devpts_t, locale_t, etc_t, bin_t, cert_t, proc_t, tmp_t, config_home_t, usr_t, var_t, textrel_shlib_t, semanage_store_t, httpd_user_script_exec_type, etc_t, cert_t, var_run_t, security_t, sysctl_crypto_t, var_run_t, useradd_t, user_home_type, semanage_tmp_t, domain, nscd_var_run_t. 
:Quindi eseguire: 
:restorecon -v '/home/riccardo'
:
:
:*****  Plugin catchall (1.31 confidence) suggests  ***************************
:
:If si crede che userdel dovrebbe avere possibilità di accesso read sui riccardo directory in modo predefinito.
:Then si dovrebbe riportare il problema come bug.
:E' possibile generare un modulo di politica locale per consentire questo accesso.
:Do
:consentire questo accesso per il momento eseguendo:
:# grep userdel /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:useradd_t:s0
:Target Context                system_u:object_r:file_t:s0
:Target Objects                /home/riccardo [ dir ]
:Source                        userdel
:Source Path                   /usr/sbin/userdel
:Port                          <Sconosciuto>
:Host                          (removed)
:Source RPM Packages           shadow-utils-4.1.4.3-14.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-145.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.2-3.fc17.x86_64 #1 SMP Tue Aug
:                              21 19:06:52 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-08-24 11:56:55 CEST
:Last Seen                     2012-08-24 11:56:55 CEST
:Local ID                      fdb599a5-f9a5-4d6a-8c91-f4698b5be3d3
:
:Raw Audit Messages
:type=AVC msg=audit(1345802215.511:85): avc:  denied  { read } for  pid=1899 comm="userdel" name="riccardo" dev="sda5" ino=3407873 scontext=system_u:system_r:useradd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1345802215.511:85): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=7f0eb6d015b0 a2=90800 a3=0 items=0 ppid=1068 pid=1899 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4 comm=userdel exe=/usr/sbin/userdel subj=system_u:system_r:useradd_t:s0 key=(null)
:
:Hash: userdel,useradd_t,file_t,dir,read
:
:audit2allow
:
:#============= useradd_t ==============
:allow useradd_t file_t:dir read;
:
:audit2allow -R
:
:#============= useradd_t ==============
:allow useradd_t file_t:dir read;
:
Comment 1 Riccardo Angelino 2012-10-23 12:07:25 EDT
Created attachment 632181 [details]
File: type
Comment 2 Riccardo Angelino 2012-10-23 12:07:27 EDT
Created attachment 632182 [details]
File: hashmarkername
Comment 3 Daniel Walsh 2012-10-24 12:11:47 EDT
Did you read the setroubleshoot.  file_t means you have a mislabled file system.

restorecon -R -v /home

or 

touch /.autorelabel; reboot

Note You need to log in before you can comment on or make changes to this bug.