LinuxQuestions.org
Visit Jeremy's Blog.
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-20-2005, 12:18 PM   #1
amer_58
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2
Posts: 213

Rep: Reputation: 30
root password


I have done sth wrong, I saw post in here that someone asking about how to change root password on one line:

and that was the answer
Code:
echo "root:newpassword" | chpasswd -m
and thats what i did, i just wanted to try it out, and now my root password is changed but i cant figure out what it is, i cant su anymore, I have tried to access the linux single, so when the lilo boot i typed linux single, then i was promoted to enter the user name:

(none): "I typed here root"
passowrd: "I didnt know what to enter and it wont except my old password"

any one can help?
 
Old 08-20-2005, 12:44 PM   #2
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Rep: Reputation: 47
If you wish to use the root account in more traditional UNIX fashion,
you can set the root password by typing sudo passwd root.
This will allow you to use su or login as root on the console.

If you need a shell with root privileges, run sudo -s.

All uses of sudo will require the user's password.
 
Old 08-20-2005, 01:08 PM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
To be able do to that, doesn't he need to have the /etc/sudoers file set up first?
 
Old 08-20-2005, 01:20 PM   #4
amer_58
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2
Posts: 213

Original Poster
Rep: Reputation: 30
maybe i haven’t explained well, i don’t have the root privilege any more my root password has been changed into sth that i don’t know, i have tried doing this from my boot lilo:

linux init=/bin/bash

then i recieve sth like this

bash-3.00# and if i type passwd i get command not found!!

So what are my options here, do I have to boot from my floppy and try changing it the root password from there?
 
Old 08-20-2005, 01:21 PM   #5
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Rep: Reputation: 47
Unhappy

I understand that "assumption is the mother of all f#ckups", but I did assume that he knows it, since he messes with root passwords
My mistake??
 
Old 08-20-2005, 02:23 PM   #6
amer_58
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2
Posts: 213

Original Poster
Rep: Reputation: 30
Guys i do need ur help, i have tried almost everything:

booting from the cd then mount /dev/hda2 /mnt
vi /etc/passwd by deletething the x olny
vi /etc/shadow i have as root::9804:0:::::

i also tried from my lilo
linux single
linux 1
linux init=/bin/bash

But the strange thing is that when I booted from the cd and access the vi/etc/shadow I have it like this:

root:”mynamewarehere”:9804:0:::::


Nothing is working.. Could someone give me a hand please?

Last edited by amer_58; 08-20-2005 at 02:24 PM.
 
Old 08-20-2005, 03:41 PM   #7
Netizen
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Slackware and Ubuntu
Posts: 355

Rep: Reputation: 30
Quote:
Originally posted by amer_58
Guys i do need ur help, i have tried almost everything:

booting from the cd then mount /dev/hda2 /mnt
vi /etc/passwd by deletething the x olny
vi /etc/shadow i have as root::9804:0:::::

i also tried from my lilo
linux single
linux 1
linux init=/bin/bash

But the strange thing is that when I booted from the cd and access the vi/etc/shadow I have it like this:

root:”mynamewarehere”:9804:0:::::


Nothing is working.. Could someone give me a hand please?
And you deleted everything between the first and second :? That should basically set your root password to nothing.
 
  


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
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 11:28 PM
Booting into Single User on MDK 9 asks for root password instead of booting into root acadcworks Linux - General 6 01-10-2006 07:51 AM
root password a4syed Linux - General 7 10-01-2005 08:04 PM
Logged in as root, prompted for root password ta0kira Slackware 13 04-25-2005 02:29 AM
root password shanenin Linux - Security 13 09-25-2003 05:34 PM

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

All times are GMT -5. The time now is 05:14 AM.

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