LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training 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 03-03-2009, 11:50 AM   #1
Maniyar.Taufiq
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
Unhappy Renaming Root


I have changed the name of my root account in /etc/passwd as "abc", After that I can not be able to login as root, neither can i use the name "abc" for login. Is their any method to overcome this problem.
 
Old 03-03-2009, 11:56 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
That was something you did NOT want to do----but I supect you already know that now.....

You can recover by rebooting into single-user mode and editing the file: When the GRUB menu appears, hit "escape" to get into text mode, then hit "e" for edit. Select the kernel line, "e" again, and add the word "single" (no quotes) at the end. Hit enter, and then "b" to boot. You will boot up into a terminal, running as root.

You can also boot from a live CD and edit the file from there.
 
Old 03-03-2009, 12:51 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
And in addition to that: the procedure only went pear-shaped because
you only changed the entry in /etc/passwd, and the entry in /etc/shadow
didn't match ...
 
Old 03-03-2009, 01:20 PM   #4
T74marcell
Member
 
Registered: Mar 2009
Posts: 102

Rep: Reputation: 18
What did you plan to achieve by renaming root?

If you only wanted a different username with root privileges, then you should have created a new user, and then adding it to the sudoers list. I'm sure you will find a lot of Google results for sudo and sudoers to explain how that is to be done.

----------
T74marcell

Arch Linux

Last edited by T74marcell; 03-14-2009 at 12:41 AM.
 
Old 03-03-2009, 01:25 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Obfuscation ;}


If you use a weak password like 0rANge, making the username something
like falafel instead of root makes it harder to gain access ;D
 
Old 03-03-2009, 02:52 PM   #6
synss
Member
 
Registered: Jul 2007
Location: Germany
Distribution: Debian, Gentoo, Mac OS X
Posts: 137

Rep: Reputation: 22
root is a user with UID=GID=0. So to change the name, you just create a user with UID=GID=0 and lock root. Although, I would also recommend locking root anyway and using sudo instead, like the user above said.
 
Old 03-03-2009, 05:02 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Use vipw(8) if you're going to edit /etc/passwd. And changing the root account's name should be # 1,001 on your list of 1,000 ways to secure GNU/Linux. (i.e. It didn't make the list.)

Last edited by anomie; 03-03-2009 at 05:03 PM.
 
  


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
renaming files starwarsfan982 Linux - Software 7 10-30-2006 02:06 PM
Renaming Zmyrgel Linux - General 1 08-06-2006 07:59 AM
renaming files TomalakBORG Linux - Newbie 4 12-24-2005 10:14 AM
Renaming of Root id RajaRC Linux - Security 1 08-30-2004 06:04 AM
renaming root account nuttyvishal4u Linux - Newbie 2 06-12-2003 07:57 AM


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