LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-31-2009, 04:13 AM   #1
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Rep: Reputation: 15
Deleting Users


I think I've made a complete hash of the Ubuntu install on my wife's laptop.

Like an idiot, I entered her account details first instead of setting up an overall admin account. After installing I created an admin account thinking that I'd be able to delete the original account and re-create it.

It allowed me to delete the user account via the Admin/Users and Groups menu item but if I try to recreate it I get an error telling me that it already exists.

I've tried this

sudo userdel -r <username>

but that returns a "<username> does not exist" error, which doesn't make
sense.

I'm getting the feeling that it might be worth starting the install from
scratch, any opinions or advice?

Many thanks.

Last edited by wilbyforce; 09-01-2009 at 08:53 AM. Reason: Solved
 
Old 08-31-2009, 04:17 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Firstly, if you have simply installed it and not actually used it, a reinstall would be the quickest fix. Secondly, and Admin account? Rot is both built in and disabled - Ubuntu do not support installations which have the root account enabled, what will this admin account give you that an account+sudo won't?
 
Old 08-31-2009, 05:11 AM   #3
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by XavierP View Post
and Admin account? Rot is both built in and disabled - Ubuntu do not support installations which have the root account enabled, what will this admin account give you that an account+sudo won't?
Well this is probably the newbie in me coming out but when I install Ubuntu the first account it creates has admin priviledges. This is the account that I use to install apps and apply updates. All other accounts are "desktop" users.

Are you saying that the primary account that Ubuntu creates should be have its Admin priviledges revoked?

Thanks for responding
 
Old 08-31-2009, 05:23 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
No that is not what he's saying, at least that's not what I understand. He's questioning why you need a seperate admin account if you have a normal user account with sudo (which equeals to an admin account).
 
Old 08-31-2009, 05:35 AM   #5
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Well I'm totally confuzzled now! Ubuntu creates an Admin account during installation doesn't it? I don't mean Root, I mean the account that you name and supply a password for during installation. Sorry, I'm being a bit thick.
 
Old 08-31-2009, 06:19 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
The first account that is created is a normal user account that is added to sudoers and therefor can behave as an admin. You can indeed call that the admin account.

Quote:
Like an idiot, I entered her account details first instead of setting up an overall admin account. After installing I created an admin account thinking that I'd be able to delete the original account and re-create it.
You already had that overall admin account, the first user that was created during install. So why create another one?
 
Old 08-31-2009, 06:46 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Ok, I see what you're saying here. If you only want one account with rights to use sudo, just install as normal. If you want to have multiple accounts with some having access and some not, you will need to run sudo visudo and amend the sudoers file to specify who should have access and who shouldn't
 
Old 08-31-2009, 06:48 AM   #8
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
wilbyforce

In Debian, Slackware, Fedora and such when you install, a root account is setup and then users are added after. The Ubuntu's create a Primary user with sudo admin rights, which means the first user can make admin changes to the system. But there is NOT a root admin account as that you can log into like in other linux distros. If you have a root account you can log into that account and leave it open and work from it for any length of time. With a sudo account you perform the admin task at hand and that's it your left in a terminal as a user. With a root account it would be easy to walk away from the pc logged into a root session and have someone come up after you and do all kinds of damage. This is one way that Ubuntu helps in keeping a system secure, a terminal window left unattended and someone coming in after can not make changes affecting the system. Also if someone were to crack your system they can't get use of a root account because there is no root account, they would HAVE to get the passwd to make changes.

Hope that helps

Last edited by mrrangerman; 08-31-2009 at 06:50 AM. Reason: add info
 
Old 08-31-2009, 06:54 AM   #9
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Many thanks to all who have responded, I think my penny is dropping at last. I'll take another look when I next have access to the laptop.
 
Old 08-31-2009, 06:55 AM   #10
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mrrangerman View Post
Hope that helps
Thanks for clarifying that.
 
Old 08-31-2009, 07:08 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Ok if you have deleted the normal user account and have not yet set the password for the root user you can still do that by booting into single user mode. You can then set the password for root account and then create the normal user account as well from there.
 
Old 08-31-2009, 07:31 AM   #12
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by linuxlover.chaitanya View Post
Ok if you have deleted the normal user account and have not yet set the password for the root user you can still do that by booting into single user mode. You can then set the password for root account and then create the normal user account as well from there.
I think there's way too much potential for me to royally screw things up as root but thanks for responding
 
Old 08-31-2009, 11:49 PM   #13
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally Posted by wilbyforce View Post
I think there's way too much potential for me to royally screw things up as root but thanks for responding
Not just for you. But you can still create a user and then use that instead.
 
Old 09-01-2009, 12:04 AM   #14
saifkhan123
Member
 
Registered: Apr 2009
Distribution: Red Hat/CentOS
Posts: 108

Rep: Reputation: 19
hmmm

well!!!when i get stuck in users, i prefer looking at /etc/passwd file for,
 
Old 09-01-2009, 01:36 AM   #15
wilbyforce
Member
 
Registered: Aug 2009
Posts: 38

Original Poster
Rep: Reputation: 15
I deleted the phantom user from the Group file using vi and I was then able to re-create it as a desktop account. All is well, many thanks for all the advice
 
  


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
Deleting Users sseeker Linux - Newbie 3 08-23-2007 04:52 AM
Deleting Users Ammad Linux - General 4 03-20-2007 02:38 AM
deleting users from mysql jsheffie Linux - Software 4 10-18-2005 09:29 PM
manually deleting users nukeu666 Linux - General 5 08-14-2004 07:32 AM
deleting users -error Debra_Dixon Linux - Newbie 6 08-10-2004 10:27 AM


All times are GMT -5. The time now is 04:01 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