Can somebody explain the -R option for userdel command?
Solution 1:
Some userdel
versions have this option:
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the
configuration files from the CHROOT_DIR directory.
In other words, instead of editing /etc/passwd
and friends,
you're editing CHROOT_DIR/etc/passwd
.
For example, you might boot a live CD, mount the hard drive as /mnt
,
and then use -R /mnt
to edit its users.
source