Viewing my root password / creating an all permissions user
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Viewing my root password / creating an all permissions user
I forgot my root password and want to view it. I read in a very old post howt to boot as single and change it, but i cant change it because there are more people using this PC and needing root. If i were not able to view the password, how can i create a user which has all privileges (as root ).
Well, don't forget the obvious... ASK? if your a ligit user of the system just ask the other people/administrators.
If the password is encrypted, then sorry... the hash changes at every reboot if I'm not mistaken (to prevent non root users to decipher/crack the password).
I tried to inti as single user using -init 1, but it asked me for the root password!! ...mmm. I cant ask (social engeneering is not usefull in this case ) i tried also using -single and -init=/bash/sh but it intialized normally as my non-priviledged user.
Why does this happends.... who and how does not let me init as single.... mmm really strage
well, you cought me
i can explain the situation:
in my school there is being made a project of the goverment about the computers in studies etc.. so we have 15 computers (1 per 2 people) in all classes. The problem we found (teachers and students) is that we cannot install many programs because noone (even teachers) in the school knows the root pass. That's why one of my teachers, knowing that i'm already used to linux (i installed linux at home last year, and i love it) asked me to get the pass.
a beatiful story, isn't it?. Can anybody help me?
...anyway... im still triying. Today I accesed as root! While probing everything in the -init option did not worked (asked x a pass or started normally) i discovered how to enter as root: the fsck!
My partner didn't shut down the PC right and when i started the Fsck started to work... and after a while it stoped and asked me to do a manual sfck without -a parameter. So... i found myself typing in the shell as root! I mounted the root fs but ... SURPRISE! that computer does not have any user / password managing program, even passwd, useradd, etc... mmm
The one who designed that distrib (http://www.guadalinex.org) is bloody PARANOIC!
I know with rh if you boot off of the install CD you can go into rescue mode. Once you are in rescue mode you can do a chroot to the primary partition which will most likely be mounted in the /mnt part. Once you chroot you can install apps and make changes to the system b/c the security policy doesn't start since it booted from the CD. You probably could copy the useradd from another distribution that is like it and add new users or change users privileges
Originally posted by iaredam I know with rh if you boot off of the install CD you can go into rescue mode. Once you are in rescue mode you can do a chroot to the primary partition which will most likely be mounted in the /mnt part. Once you chroot you can install apps and make changes to the system b/c the security policy doesn't start since it booted from the CD. You probably could copy the useradd from another distribution that is like it and add new users or change users privileges
One good reason to make sure you don't set your BIOS to boot from CD and also put a supervisor password on it.
good point but yet even still, removing the CMOS battery = disabling the BIOS passwd on a lot of mother boards, or has this changed recently??
The more i think about it, it is 2 easy to get the root password or root access to a Linux box. And on a windows machine u can get all the data off by A installing the next highest version of windows on the same partition or B installing a Knoppix CD and letting it automount the drives for you.
Bascially, once someone has physical access to the machine, there is not much preventing them from gettin root access and doing whatever they want.
If he wanted, he could burn a Gentoo CD, boot it, create a passwd file via the passwd command, mount the drive in question, and copy the created passwd file over the one on the mounted drive, boot back into installed OS and use newly created password.
i have yet to try this because i have no need to, but if this is as easy as I say, make sure you keep your most precious machines behind good physical security as well as internet security.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Robert, even with WinXP you can simply use the Win2K disk to go into recovery mode, so it's not like it's impossible to change the Admin password on Windows. Also, someone has created a great little Linux floppy imagine with Windows password manipulation tools. Just boot off the floppy and WHEEEE (so I'm told).
There are always measures and counter-measures, but let's just generally assume that physical access to a box will allow root after some amount of time. You can put things in place so the time required to get root will be longer, but you can't make it impossible. The only way to save your data is to encrypt it.
Of course, most critically important machines should not be in a place where anyone has access to them. For instance, credit card companies keep their transaction approving machines in guarded data centers with many layers of physical access controls, including man-traps, multiple access badges, etc.
>the hash changes at every reboot if I'm not mistaken
>(to prevent non root users to decipher/crack the password).
I'v never seen a linux machine that does that and I don't
think it would provide any security. The whole point of a
hash is that is produces the same result every time but
is not reversable.
Perhaps you meant changing the salt every time the user logs
in? The plaintext password would be requried to make a new.
hash. That would not make the machine any more secure
since someone who has got access to the shadow password
file still knows the hash, the salt and the algorithm.
>So... i found myself typing in the shell as root!
At this point you could have copied /etc/shadow and taken it home to run through a cracking program. If the password
is an english word then it will be found in minutes.