How to bypass the sudo password in *buntu?
Hello all.
I study in a place where we don't have access to sudo, i yesterday i talked with the sys admin of my college, and he tells me i can bypass (or recover) the user password (or even sudo) via a live CD and reading Code:
etc/shadow Code:
/etc/password I tried it but it doesn't work, any idea of how to see the sudo (or user) password? Just for clear this: i don't want to pass my college pc password, its just for personal use and work. Thanks in advance! |
If you can boot from a live CD, why do you not have access to sudo? Is this a school provided laptop?
If you are the only user of the laptop you should be in the sudo group by default with an Ubuntu install. You can NOT read the password from /etc/shadow or /ect/password, that would be a huge security issue. But you can reset the passwords by editing these files. But there are less risky ways to do that. |
Quote:
Code:
root@haswell:/home/seeder1# cat /etc/sudoers |
Quote:
Quote:
|
"A place where we do not have access to sudo" makes no sense to me. Sudo is not in any place other than on a particular computer. I can't tell if the OP is trying to get sudo on his/her laptop, or into the college network, or what. I also don't understand the difference between school and personal access. Apparently the user password for the computer is known, and that would be the sudo password. If sudo is not enabled on the laptop, there are ways to do that, provided the root password is known. Without the root password and without sudo being enabled, I know of no way to get the root password.
|
Quote:
|
This has been said several ways but:
Most systems are designed so that it's technically impossible to recover plaintext passwords. Linux is one of them, and it's by design that /etc/passwd and /etc/shadow don't contain passwords. The sudo password is the user password. Whether said password actually gets you sudo access is configured separately, and yes you can change that from a livecd. I'll let more experienced people write the details, but this howto should be good to start from: https://www.digitalocean.com/communi...e-sudoers-file |
I hate to be a killjoy and maybe I'm just a cynical old man (well, there's no maybe about it), but I must ask, why are wanting to obtain unauthorized access to this machine?
|
Quote:
|
Ok guys, just to clarify it..
1.- i'm a computer technician, if i get a client who can't login in linux, i need a wat to bypass the password. 2.-, i DON'T want to bypass the college computer password, i talked with the sys admin of my college and he tells me to read shadow and password files. 3.- i dont think there's no way to bypass linux passwords, in windows we have the SAM directory, kon-boot, etc, i'm secure there's a way to bypass or change the linux users password. Regards. |
You can change the user password as long as the drive isn't encrypted. If it's encrypted, there is nothing you can do, because without the password to decrypt the drive you can't access anything.
|
If you get a person that cannot login to Linux for some reason, like they forgot their password, then you can boot into recovery mode and reset their password. The recovery mode menu in Ubuntu has a few common things in the menu for fixing issues. Unless you are using some other authentication system.
Also, recent versions of kon-boot say they will work on Linux, so give it a try. The admin you talked to is full of shite if they think reading /etc/password works anymore. This is not 1980, and passwords are not stored in plain text. A place I used to work at we had the hash for the default password that we could edit into /etc/password then tell users to use that to login then change their password. That is the closest you will get to being able to 'read' /etc/password, and that only worked because we used NIS. You need to read up on booting grub into single user mode to get access to a system root prompt. |
There is no way to recover the user's password, only change it. If you can't get into the machine at all and do not have root access, boot the machine to single user mode and change root's password.
|
Quote:
See "man passwd" for information on that. |
Quote:
|
All times are GMT -5. The time now is 05:50 AM. |