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 02-15-2008, 11:03 PM   #1
thornbush
Member
 
Registered: Jan 2008
Location: Brazil, state of São Paulo, Jundiaí city
Distribution: Debian squeeze/wheezy; LMDE-XFCE
Posts: 35

Rep: Reputation: 15
Geting a new password of super-user


Dear Friends,
I am trying to install new filles, but I can't, and I can't loging me as a super-user. Perhaps I forget my password, yet I did not think so.
But, can I get a new password of super-user?
Following, some copyes of the Shell - Konsole:
knoppix@kalango:~$ apt-get install tux
E: Não foi possível abri arquivo de trava /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), [B]are you root?
(...)

knoppix@kalango:~$ su *****
Unknown id: *****
(...)
knoppix@kalango:~$ sudo su *****
Unknown id: ********
(...)
knoppix@kalango:~$ su
Password:
su: Authentication failure
Sorry.
knoppix@kalango:~$ su
Password:

(At this moment, I used the commom password. In other moments, I tryed to log me in with it, but I can't log, but using "su" without other arguments, it was possible).
Thank you.

Last edited by thornbush; 02-17-2008 at 08:46 PM. Reason: solved
 
Old 02-16-2008, 01:00 AM   #2
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Rep: Reputation: 32
to change passwords you use the command passwd *user*

example:

Code:
passwd root
 
Old 02-16-2008, 02:03 AM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
I've might misunderstood you, but you are not supposed to write the password as a part of the command, you will be asked for the password.

when you use sudo, you have been privileged with superuser abilities, and therefor use your own password as authentication, while su changes user to root, and therefor you will have to use the root password for authentication.
 
Old 02-16-2008, 06:07 AM   #4
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Boot from any live-cd and open a /etc/shadow file of your installed system. There are entries of type <username>:<password_hash>:...etc in it (complete format in man shadow).
Find root entry (usually it's first) and replace the password hash with a hash of your regular user entry.
Than boot into installed system, login as a root with your regular user's password, and change root pass with passwd command.
 
Old 02-16-2008, 08:18 PM   #5
thornbush
Member
 
Registered: Jan 2008
Location: Brazil, state of São Paulo, Jundiaí city
Distribution: Debian squeeze/wheezy; LMDE-XFCE
Posts: 35

Original Poster
Rep: Reputation: 15
How can I write a hash of my regular user entry?

Quote:
Originally Posted by Samotnik View Post
Boot from any live-cd and open a /etc/shadow file of your installed system. There are entries of type <username>:<password_hash>:...etc in it (complete format in man shadow).
Find root entry (usually it's first) and replace the password hash with a hash of your regular user entry.
Than boot into installed system, login as a root with your regular user's password, and change root pass with passwd command.

Thank you, but how can I write a hash of my regular user entry, that is, how can I write such a hash?
 
Old 02-16-2008, 08:54 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by thornbush View Post
how can I write a hash of my regular user entry, that is, how can I write such a hash?
I think the assumption was that you could find the hashed password on another line of that same file for some account for which you know the unhashed password. Then edit the file to make the hashed password of root the same as the hashed password for the other account for which you know the unhashed password.
 
Old 02-17-2008, 08:36 PM   #7
thornbush
Member
 
Registered: Jan 2008
Location: Brazil, state of São Paulo, Jundiaí city
Distribution: Debian squeeze/wheezy; LMDE-XFCE
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks

Dear friends and fellow users,
Thanks because you was so careful.
I follow the counsel of Samotnik. It was very instructive. I saw the shadow directly, I know what is criptography, and I learn a lot of commands and know a lot of archives, or command "Kuser", as described at the KDE/SYSTEM/KUSER, and I received a temporaly (?) login, and by it I edit the user by de "Kuser" graphic. But I didn't believe it immediatly On the contrary, I continued to try to edit the shadow, until a half past four AM. As I sayd, it was instructive, but I became tired.
At this day, I try many passwords, then I try the password that I edit yesterday (or, better, today) and I became root.
Thanks to all of you, and I give thanks also to God, who use all things to discipline and perfect me in His life.
 
  


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
super user password uchuanng Linux - Server 11 11-17-2007 09:57 PM
Changine the super user password swamprat SUSE / openSUSE 1 01-25-2007 11:58 PM
How do i set my super user password? Nexxt Ubuntu 4 01-03-2007 11:36 AM
error (super user) password hero_19873 Linux - Newbie 4 05-02-2006 05:50 AM
Super user password in Knoppix 3.9 sfzab Linux - Software 2 12-26-2005 10:08 PM


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