LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 03-17-2009, 12:32 AM   #1
Sharpeye
LQ Newbie
 
Registered: Jun 2008
Location: DOTA
Distribution: Debian
Posts: 2

Rep: Reputation: 0
User shown as "already exist" when there is no user directory shown on home directory


Hi all,

This is my first post so forgive me if i am not asking properly. I want to add user to my server, i sort of do some testing first by creating the user name using command adduser and useradd and even smbpasswd -a to set up the password.

I manage to create the user and the home directory and later remove it just to test on the remove command. I use userdel -r command. I manage to remove the user home directory and i suppose the user as well. Later on i tried to adduser/useradd to create that user, it says user already exists. I check the home directory and there is no user directory...
How do i make sure the user is completely removed so that i can add the user again?

thanks for your help,
Sharpeye the noobie
 
Old 03-17-2009, 01:12 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Hi and welcome to LQ!
You should always read the man pages for a command you are going to run and you're not familiar with first.For example man userdel.When you run command userdel -r some files owned by the user will still be on the system.Also it's better if you do not delete currently logged user.Try to use command
Code:
deluser --remove-all-files user
Replace user with the name of the user.If you read the man page for userdel you'll see that in Debian you should use deluser command.You can always reboot and see if the user still exists.
 
Old 03-18-2009, 01:24 AM   #3
Sharpeye
LQ Newbie
 
Registered: Jun 2008
Location: DOTA
Distribution: Debian
Posts: 2

Original Poster
Rep: Reputation: 0
Hi thanks alan, i manage to remove all the user files. I have yet to add the user again, You are right I should read thoroughly on the Man page or resources from internet...at the moment I find it really hard to learn linux... when there is so many different command or ways to get things done... for example why is there a few command or tools such as adduser and useradd to add a user?, Dselect, Dpkg and apt-get to get new updates and applications? It is just too much!! Sorry I am just raging on my inability to master linux.

Anyway Thanks for your help again
 
Old 03-18-2009, 02:17 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
GNU/Linux is as you know open source,so anybody can achive something with Linux in a different way.The best part many would say is that you can achive something completly on your own,meaning you can for a example create a BASH script and use it for something.That's why there are so many options to do something in GNU/Linux,because people are always doin' something new for it.That said,I can only suggest you to learn and learn and learn about Linux,GNU and open source in general,and if you do so maybe one day we will see a Sharpeye's Linux distribution on Distrowatch.Wouldn't that be nice?

Last edited by alan_ri; 03-18-2009 at 02:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 05:12 PM
"Home directory already exists. Please enter another home directory path." Daravon Ubuntu 2 02-15-2009 11:26 PM
how do U "root" a user to their home directory? itobenon Linux - Security 2 08-22-2008 01:17 PM
permissions of my /home/"user" directory error darkleaf Linux - Software 10 09-26-2004 03:08 AM
RH9 NIS login error: "home directory does not exist" airrr Linux - Networking 2 08-06-2003 02:47 PM


All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration