linux下添加用户用useradd时,如果报错Creating mailbox file: File exists

可能是之前删除用户时userdel xxx 没有加-r,因此只删除了用户,并未删除用户的配置文件

例如配置文件的路径在/var/spool/mail/xxx

# userdel -r
Usage: userdel [options] LOGIN

Options:
  -f, --force                   force some actions that would fail otherwise
                                e.g. removal of user still logged in
                                or files, even if not owned by the user
  -h, --help                    display this help message and exit
  -r, --remove                  remove home directory and mail spool
  -R, --root CHROOT_DIR         directory to chroot into
  -Z, --selinux-user            remove any SELinux user mapping for the user

Logo

更多推荐