LinuxQuestions.org
Help answer threads with 0 replies.
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 10-21-2011, 01:20 PM   #1
m00seman645
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:

Code:
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

Code:
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.

Thanks,
Corey
 
Old 10-21-2011, 01:50 PM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,620

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Hi,

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
/etc/passwd

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, 02:56 PM   #3
m00seman645
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.

-Corey
 
  


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
PostFix + ISPConfig mail return "unknown user" or "no such user here" Jacky444 Linux - Server 1 02-10-2010 05: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 05:42 PM
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 03:11 PM
pam_succeed_if: requirement "uid < 100" not met by user Phonics3k Linux - General 3 12-17-2004 10:13 AM
changing UID of a user to "0" paeng16 Linux - Security 5 06-17-2004 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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