Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
11-29-2006, 09:17 PM
|
#1
|
LQ Newbie
Registered: Nov 2006
Location: Naval Air Weapons Station China Lake, CA
Posts: 8
Rep:
|
Hungry Computer
Does anybody know how to re-install a root user ID? To login into administration mode (super-user) I would use this information on the prompt screen:
Login name: root
Login password ********
For some reason however, my access is denied. I can no longer access Root options. I can still log in under my non-superpower mode just fine:
Login name: ruxban
Login password: billy2!
Here's the deal. I still remember my root password. I just don't have the login name anymore. I think my computer ate it. How do I assign one? I have no administrative power, and I don't want to re-install Linux. Is there a generic Login Name you could use along with your Root password that I don't know about? Is there a way to access Root Functions through the Terminal program?
Any help would be appreciated. I currently have Linux for Dummies sitting on my desk, and I barely understand that, so I might be just missing something.
Simple Terms: No Root access. Remember Root password. Need Root Login name. Help. SOS. AFLAC!!!!!
|
|
|
11-29-2006, 09:34 PM
|
#2
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
first login as user. then type "su". when it asks for pw, enter your root pw.
|
|
|
11-30-2006, 04:53 AM
|
#3
|
Member
Registered: Nov 2005
Posts: 144
Rep:
|
Not sure I understand your probmlem, usually the root account name is "root".
EDIT: Or are you using ubuntu or another distro with dectivated root account?
Last edited by Lotharster; 11-30-2006 at 04:54 AM.
|
|
|
11-30-2006, 08:31 AM
|
#4
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
"su" seems a good approach to start with. Once logged in as root, you should be able to look at /etc/passwd to find out the username (which is usually 'root', but doesn't have to be).
Just a final pointer: don't ever post or give anyone else your passwords! Not for root or any other account.
|
|
|
11-30-2006, 09:10 AM
|
#5
|
Member
Registered: Jun 2005
Posts: 445
Rep:
|
Are you trying to log in with a GUI like GDM/KDM (that is NOT the command line login?). Then root access might just be denied in the display manager and you can change this in the configuration tool/file (kcontrol for KDE with KDM).
|
|
|
11-30-2006, 03:26 PM
|
#6
|
LQ Newbie
Registered: Nov 2006
Location: Naval Air Weapons Station China Lake, CA
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by slackhack
first login as user. then type "su". when it asks for pw, enter your root pw.
|
Here is what it says:
ruxban@linux:~> su
su: user root does not exist
ruxban@linux:~>
What now???
.... Billy2! is just made up. Its not really my password. Good tip though
Last edited by ruxban; 11-30-2006 at 03:28 PM.
|
|
|
11-30-2006, 03:53 PM
|
#7
|
Member
Registered: Jan 2006
Location: Romania
Distribution: Suse 12.0, Slackware 12.1, Debian, Ubuntu, Gentoo
Posts: 301
Rep:
|
theoretically you should be able to access /etc/passwd with a regular user account too on most distros. You should check it to see what users you have.
And you said it worked before, and then it suddenly just stopped working, without you modifying anything? try to remember what caused it to "dissapear".
BTW, what distribution are you using?
|
|
|
12-01-2006, 02:41 AM
|
#8
|
LQ Newbie
Registered: Nov 2006
Location: Naval Air Weapons Station China Lake, CA
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by Valkyrie_of_valhalla
theoretically you should be able to access /etc/passwd with a regular user account too on most distros. You should check it to see what users you have.
And you said it worked before, and then it suddenly just stopped working, without you modifying anything? try to remember what caused it to "dissapear".
BTW, what distribution are you using?
|
___________________________________________________________________
ruxban@linux:~> /etc/passwd
bash: /etc/passwd: Permission denied
ruxban@linux:~>
Here is the what I'm getting now. Any other suggestions?
What I was doing: I was installing plug-ins off the Linux website. After Installing a few, my computer prompted me to "restart" to save changes. When I restarted, Administative options were no longer in exsistence. Using the login name (root) and my password, I was told Invalid login.
I'm running Suzi 9.0?
|
|
|
12-01-2006, 02:44 AM
|
#9
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
Code:
ruxban@linux:~> grep :0: /etc/passwd
What's the result?
|
|
|
12-01-2006, 05:40 PM
|
#10
|
LQ Newbie
Registered: Nov 2006
Location: Naval Air Weapons Station China Lake, CA
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by chort
Code:
ruxban@linux:~> grep :0: /etc/passwd
What's the result?
|
-------------------------------------------------------------------
RESULT:
At the top of the terminal program (very top) it reads:
<Finished> -/bin/sh - Konsole
However, the screen is blank (it dosen't read- ruxban@linux:~>) and I am unable to type anything.
|
|
|
12-01-2006, 11:16 PM
|
#11
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
Wow... I have no idea what's going on, but it sounds like your system is hosed.
Just to clarify, you only typed the grep :0: /etc/passwd part, right? That definitely should not kill your terminal.
|
|
|
12-02-2006, 06:41 AM
|
#12
|
Member
Registered: Jan 2006
Location: Romania
Distribution: Suse 12.0, Slackware 12.1, Debian, Ubuntu, Gentoo
Posts: 301
Rep:
|
try:
less /etc/passwd
and see what it shows.
BTW, if you tipe just /etc/passwd, it will try to run it as an executable, and, as it is not, you will always get permission denied.
|
|
|
12-03-2006, 06:34 PM
|
#13
|
LQ Newbie
Registered: Nov 2006
Location: Naval Air Weapons Station China Lake, CA
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by Valkyrie_of_valhalla
try:
less /etc/passwd
and see what it shows.
BTW, if you tipe just /etc/passwd, it will try to run it as an executable, and, as it is not, you will always get permission denied.
|
___________________________________________________________________
It now reads the following:
bin:x:1:1:bin:/bin:/bin/bash
daemon:x:2:2 aemon:/sbin:/bin/bash
lp:x:4:7:Printing daemon:/var/spool/lpd:/bin/bash
mail:x:8:12:Mailer daemon:/var/spool/clientmqueue:/bin/false
news:x:9:13:News system:/etc/news:/bin/bash
uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash
games:x:12:100:Games account:/var/games:/bin/bash
man:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash
at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash
wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false
ftp:x:40:49:FTP account:/srv/ftp:/bin/bash
named:x:44:44:Name server daemon:/var/lib/named:/bin/false
gdm:x:50:15:Gnome Display Manager daemon:/var/lib/gdm:/bin/bash
postfix:x:51:51:Postfix Daemon:/var/spool/postfix:/bin/false
sshd:x:71:65:SSH daemon:/var/lib/sshd:/bin/false
ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false
asterisk:x:100:16:Asterisk PBX:/var/lib/asterisk:/bin/false
messagebus:x:101:101:User for D-BUS:/var/run/dbus:/bin/false
vdr:x:102:33:Video Disk Recorder:/var/spool/video:/bin/false
jboss:x:103:102:JBoss - Java[tm] Application Server:/usr/share/jboss:/bin/bash
jonas:x:104:103:Jonas - Java[tm] Open Application Server:/usr/share/jonas:/bin/b
ash
tomcat:x:105:104:Tomcat - Apache Servlet/JSP Engine:/usr/share/tomcat5:/bin/bash
/ect/passwd lines 1-22/25 87%
... I don't know what the heck it means, but its there.
|
|
|
12-03-2006, 06:40 PM
|
#14
|
LQ Newbie
Registered: Nov 2006
Location: Naval Air Weapons Station China Lake, CA
Posts: 8
Original Poster
Rep:
|
Quote:
Originally Posted by chort
Wow... I have no idea what's going on, but it sounds like your system is hosed.
Just to clarify, you only typed the grep :0: /etc/passwd part, right? That definitely should not kill your terminal.
|
____________________________________________________________________
Affirmative Shipmate. I don't get it either. See above for more info.
|
|
|
12-03-2006, 08:16 PM
|
#15
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
You apparently no longer have a root user.
Hopefully you setup sudo... you could do
Code:
$ sudo useradd -d /root -g 0 -u 0 -s /bin/sh root
$ sudo passwd root
If you don't have sudo setup, you have a real problem.
|
|
|
All times are GMT -5. The time now is 08:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|