Linux
[Linux] userdel
Richard.Ryu
2024. 3. 11. 15:25
반응형
Linux에서 계정을 삭제하고자 할때, 사용합니다.
하지만, userdel "계정명" 으로만 삭제하면 아래와 같이 Home directory 및 mail spool 등이 남습니다.
[root@localhost home]# useradd test
[root@localhost home]# ls
test
[root@localhost home]# userdel test
[root@localhost home]# ls
test
[root@localhost test]# find / -name test -cmin -10
/var/spool/mail/test
/home/test
userdel -r 옵션으로 모두 제거할 수 있습니다.
[root@localhost home]# userdel -r test
[root@localhost home]# find / -name test -cmin -10
[root@localhost home]#
자세한 내용은 userdel --help OR man userdel 확인하시길 바랍니다.
반응형