Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Super newbie here, I am trying to delete this user from my system. But instead of using 'userdel -r user1' i forgot to add the '-r' and just keyed in 'userdel user1'. Then I noticed in the home directory that the user is still there, but is removed from the /etc/passwd directory. I tried using 'userdel -r user1' again, but system responds as 'user is deleted'. How to respond to this? as I want to delete that user?
And additionally, from the home directory. A colleague of mine, instead of creating a user using the 'useradd' command, he decided to just use 'mkdir user' at the home directory. Is it ok to use 'rmdir user' at the home directory? without causing any troubles to the system? I need advise, thank you so much..
You seem to be confused about the difference between a user (actually a user account) as defined in /etc/password and files and directories.
You have already deleted the user, want you are trying to do is delete files that were owned by the user (in this case the users home directory and contents).
You can remove the users old home and files in it using the rm command.
rm -r /home/user1
However, you should probably also use the "-f" option otherwise you will have to confirm before rm goes into each subdir. Be warned that this will permanently remove these files, so be careful (I have even avoided typing it explicitly).
If you suspect that the user also has files elsewhere on the system you can search for them with the "find" command (you should know the users numeric id). Let us know if you want pointers on using find.