Print this page
293 useradd/del/mod should be ZFS-aware

@@ -5,11 +5,11 @@
        usermod - modify a user's login information on the system
        usermod [-u uid [-o]] [-g group] [-G group [, group...]]
-            [-d dir [-m]] [-s shell] [-c comment] [-l new_name]
+            [-d dir [-m [-z|-Z]]] [-s shell] [-c comment] [-l new_name]
             [-f inactive] [-e expire]
             [-A authorization [, authorization]]
             [-P profile [, profile]] [-R role [, role]]
             [-K key=value] login

@@ -100,15 +100,24 @@
        -l new_logname
            Specify the new login name for the user. See passwd(4) for the
            requirements for usernames.
-       -m
+       -m [-z|-Z]
            Move the user's home directory to the new directory specified with
            the -d option. If the directory already exists, it must have
            permissions read/write/execute by group, where group is the user's
-           primary group.
+           primary group.  CHANGE_ZFS_FS option in /etc/default/useradd file
+           determines if ZFS filesystem will be created or destroyed during
+           this action. If this option is set to yes and parent directory of
+           user's home directory is ZFS filesystem mount point, a new ZFS
+           filesystem is created. If old user's home directory is a ZFS file
+           system and CHANGE_ZFS_FS is set to yes, the filesystem will be
+           destroyed.  -z and -Z options allow overwrite default behavior. If
+           -z option is specified, usermod tries to create new file system and
+           destroy the old one. If -Z option is specified, new filesystem is
+           not created and the old one is not destroyed.
            This option allows the specified UID to be duplicated (non-unique).

@@ -281,10 +290,14 @@
            Unable to complete the move of the home directory to the new home
+       /etc/default/useradd
+           useradd, usermod and userdel configuration file
            system file containing group definitions