Hack Forums
User account Management, i want delete user - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88)
+---- Forum: Linux (https://hackforums.net/forumdisplay.php?fid=85)
+---- Thread: User account Management, i want delete user (/showthread.php?tid=630713)



User account Management, i want delete user - blues90 - Aug 22, 2010

Hi guys, i'm new in linux, i want to know how can i delete an user account in linux but leave the home directory intact? means i want to delete the account but still want the directories. how can i do this?

i cant type this 'userdel user' because it will delete all my directory inside. please help me..😖


* - Elite Hacker 69 - Aug 22, 2010

Why not just leave the user there? 😧


* - Ryuujinx - Aug 22, 2010

No it doesn't, it only removes the /home/user folder if you specify -r

See:

Code
[root@failverse home]# ls
encfs-1.6  encfs-1.6-1.tgz  Joomla.sql  icecast  icecast-2.3.2  icecast-2.3.2.tar.gz  parse.sh  stuff  taco.fs  tacooo  ts3server
[root@failverse home]# useradd -m taco
[root@failverse home]# ls
encfs-1.6  encfs-1.6-1.tgz  gamelot  GamelotJoomla.sql  icecast  icecast-2.3.2  icecast-2.3.2.tar.gz  parse.sh  stuff  taco  taco.fs  tacooo  ts3server
[root@failverse home]# userdel taco
[root@failverse home]# ls
encfs-1.6  encfs-1.6-1.tgz  gamelot  GamelotJoomla.sql  icecast  icecast-2.3.2  icecast-2.3.2.tar.gz  parse.sh  stuff  taco  taco.fs  tacooo  ts3server



* - DaRkOoO - Aug 23, 2010

Yeah, just use userdel user, it will not touch it's directory.
You could see that in 'man' page.


* - blues90 - Aug 25, 2010

(Aug 22, 2010 10:53 PM)Ryuujinx Wrote:  No it doesn't, it only removes the /home/user folder if you specify -

See:

Code
[root@failverse home]# ls
encfs-1.6  encfs-1.6-1.tgz  Joomla.sql  icecast  icecast-2.3.2  icecast-2.3.2.tar.gz  parse.sh  stuff  taco.fs  tacooo  ts3server
[root@failverse home]# useradd -m taco
[root@failverse home]# ls
encfs-1.6  encfs-1.6-1.tgz  gamelot  GamelotJoomla.sql  icecast  icecast-2.3.2  icecast-2.3.2.tar.gz  parse.sh  stuff  taco  taco.fs  tacooo  ts3server
[root@failverse home]# userdel taco
[root@failverse home]# ls
encfs-1.6  encfs-1.6-1.tgz  gamelot  GamelotJoomla.sql  icecast  icecast-2.3.2  icecast-2.3.2.tar.gz  parse.sh  stuff  taco  taco.fs  tacooo  ts3server

yeah!! thanks man! u really help me..😉