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


  Search this Thread
Old 10-21-2011, 12:20 PM   #1
LQ Newbie
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
multiple user accounts with uid 0 . I want to delete all user names except "root"

Hi guys,

Here's the problem, I asked a coworker to give himself a new user account on our SUSE 10 box. He was going to create a cron job for the account he was making, and wanted to be an equivalent of the root user. He logged in as root and created a new account with the following commands:

useradd -ou 0 bob
So he added another username to the root uid, I want to remove his account now for obvious reasons and make him a normal user account. I've tried logging in as root and using

userdel -r  bob
but I get the message that the account is active. Obviously because I'm currently logged into root. Is there any way that I can change the bob user's uid from 0 to something else, or delete the username so that it goes back to how it should be with root being the only username for uid 0? Any help would be greatly appreciated.

Old 10-21-2011, 12:50 PM   #2
Senior Member
Registered: Jan 2010
Posts: 1,682

Rep: Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513

interesting problem. Now I have not tried this since I do not want to mess up my system but you could try to edit the file

Search for the user and change his uid (gid) to something else. Preferably to an unused number. Log out and then log back in as root. The 'active' error should not appear if you now try to delete the account and remake it properly.

P.S.: Welcome to LQ.
Old 10-21-2011, 01:56 PM   #3
LQ Newbie
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks crts you're a life saver. I changed bobs uid by editing passwd . That logged him in as a normal user, but when I logged in as root I still wasn't able to delete the account with userdel, it gave me the same error. I was however able to see the bob user in yast and delete it that way. Still it's very strange that the command still wouldn't work. Anyway I got the problem resolved and that's good enough for me. Thanks for you help again and for the welcome crts.



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
PostFix + ISPConfig mail return "unknown user" or "no such user here" Jacky444 Linux - Server 1 02-10-2010 04:21 PM
How do I enforce in Red hat linux that only root user be a member of the "root" group sultf Linux - Security 4 01-08-2009 04:42 PM
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 02:11 PM
pam_succeed_if: requirement "uid < 100" not met by user Phonics3k Linux - General 3 12-17-2004 09:13 AM
changing UID of a user to "0" paeng16 Linux - Security 5 06-16-2004 11:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 AM.

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