#212 sss_useradd should create the user's home directory
Closed: Fixed None Opened 14 years ago by sgallagh.

sss_useradd is useful only for creating local users. Therefore, it should be capable of creating a new user's home directory from a skeleton as shadow-utils' useradd does.


Moving target to 1.0, I think this needs to be done in order to call our local domain support complete

milestone: SSSD Deferred => SSSD 1.0

Fields changed

tests: 0 => 1

I am proposing that sss_userdel have a flag to remove the user's directory. Like -r option for userdel.

Readjusting the milestone. This is a feature, not a bug, so if we're going to have this for SSSD 1.0, it needs to be ready by functional completion.

milestone: SSSD 1.0 => SSSD 1.0 RC

On my Fedora box, useradd/usermode/userdel also manage the user's local mail spool file, to ensure that the permissions are correct, at least. My guess is that if sss_useradd and sss_userdel offer options that useradd and userdel do, they'll need to have logic to (offer to?) manage the mail spool, too.

Fields changed

status: new => assigned

One thing I'd like to test when the patch goes in:
- creating correct SELinux contexts - create a "public_html" directory in the skeleton directory (/etc/skel/ by default). Add a user. Check if there is a public_html directory at all. Check if it has the right context - ordinary directories in users' home dirs have the context of unconfined_u:object_r:user_home_t, the public_html should have something like unconfined_u:object_r:httpd_user_content_t

Fixed with f3bc401

resolution: => fixed
status: assigned => closed

Fields changed

fixedin: => 0.7.0

FYI jakub:

[root@localhost sssd]# ls -aZ /home/myuser/
drwx------. myuser myuser unconfined_u:object_r:user_home_dir_t:s0 .
drwxr-xr-x. root   root   system_u:object_r:home_root_t:s0 ..
-rw-r--r--. myuser myuser unconfined_u:object_r:user_home_t:s0 .bash_logout
-rw-r--r--. myuser myuser unconfined_u:object_r:user_home_t:s0 .bash_profile
-rw-r--r--. myuser myuser unconfined_u:object_r:user_home_t:s0 .bashrc
drwxr-xr-x. myuser myuser unconfined_u:object_r:gnome_home_t:s0 .gnome2
drwxr-xr-x. myuser myuser unconfined_u:object_r:mozilla_home_t:s0 .mozilla
drwxr-xr-x. myuser myuser unconfined_u:object_r:httpd_user_content_t:s0 public_html

automated tests created and executing for adding/removing home directories and mail spool files, also /etc/skel file creation and context.

tests: 1 => 0

Fields changed

rhbz: => 0

Metadata Update from @sgallagh:
- Issue assigned to jhrozek
- Issue set to the milestone: SSSD 1.0 RC

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/1254

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata