Linux - NewbieThis 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
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.
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.
Location: Brazil, state of São Paulo, Jundiaí city
Distribution: Debian squeeze/wheezy; LMDE-XFCE
Posts: 35
Rep:
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
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.
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.
Location: Brazil, state of São Paulo, Jundiaí city
Distribution: Debian squeeze/wheezy; LMDE-XFCE
Posts: 35
Original Poster
Rep:
How can I write a hash of my regular user entry?
Quote:
Originally Posted by Samotnik
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?
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.
Location: Brazil, state of São Paulo, Jundiaí city
Distribution: Debian squeeze/wheezy; LMDE-XFCE
Posts: 35
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.