SlackwareThis Forum is for the discussion of Slackware Linux.
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.
The subject says it all. I don't know what I was thinking when I changed it but it has been so long since I have needed to log on I forgot it. The box is my Internet gateway which is why I don't really log on. Once I got it working I just left it on.
Anyways, is there a way to change the root password without reinstalling? I have it set up so perfectly and don't want to change anything.
I'd be fine and just let it run but I want to keep it updated.
Any ideas would be great.
Jeem
It depends on what bootloader you are using - you need to append " single" to your kernel arguments at boot - for grub:
1) Reboot your computer.
2) When the grub bootloader appears on the screen select the entry for your linux system - it may be the only one.
3) Press the "e" key to edit the entry.
4) Select the line beggining with "kernel".
5) Press the "e" key again
6) Type " single" no quotes
7) Press enter
8) Press "b" to boot
9) When the prompt appears type "passwd" press enter
10) Enter a new password when prompted
11) Reboot by typing "shutdown -r now"
Thanks. I use LILO and Slackware 9.1. Is the procedure similar?
It seems a little strange that anyone can just do this to change the root password. It doesn't seem very secure. Not that I have anything to worry about at home but how to places that require tight security stop this from happening. All I can think of is locked doors.
Jeem
Originally posted by jeempc Thanks. I use LILO and Slackware 9.1. Is the procedure similar?
It seems a little strange that anyone can just do this to change the root password. It doesn't seem very secure. Not that I have anything to worry about at home but how to places that require tight security stop this from happening. All I can think of is locked doors.
Jeem
Since it's possible to put a password into Grub (not sure about lilo.. I think you can.) and/or into your bios to boot the machine, i really don't find it all that insecure.
Besides, there would be other methods of obtaining access anyway... Booting from knoppix, for example...
Physical access is the least secure kind :-D
-Shade
Yeah, Once you have physical access to any machine running any OS all bets are off. Since you can always reset a BIOS, always replace a boot loader, and always boot with removable media.
If you're concerned about someone hacking you beloved box, why do you use boot loaders?
Just remove the prompt option (no prompt=no ugly hacks) and keep a "single user bootdisk" hidden in case of emergency. Preferably where the sun don't shine =D.
Problem solved! =)
Originally posted by leonscape As long as the would be hacker doesn't bring a knoppix Live CD, or his own bootdisk.....
With a BIOS password and a change to the boot order you can stop this.
It should be noted however that if you have access to a computer you can physically remove the hdd and mount the drive's partitions in another computer. You could look into encrypted filesystems if you have lots of sensitive data.
if your paranoid about physical access you could always lock up the box itself for added security. or buy a case that has a locking mechanism on it to lock up the drive bays. even though it is flimsy you will atleast know if someone attempted or acually got into your box because the lock will be broken. just make sure it covers the floppy drive too. Just an Idea.
Thanks for all those ideas. I figure if I have sensitive data I can just encrypt it with GPG.
My question is can you encrypt any kind of file with gpg -c filename ?
It makes sense with text but how about a MS Word document or a pdf. Can you encrypt binary files?
I am not personally worried about someone coming into my house but lets say I had nosey roommates and they had a boot cd.
In my scenario I thought I forgot the root password but maybe someone actually had access to my machine and changed it and that's why my password didn't work. It makes one wonder.
Speaking of BIOS passwords. I set a hard drive password on a hard drive I used in my laptop. Then my laptop motherboard fried. While the laptop was at Dell I forgot the hard drive password and they upgraded the bios. When I got it back my hard drive was usless.
Is there any way to bypass the hard-drive password now.
It really sucks because I lost 40 gigs of drive space and have to use my spare drive which is only 10 gigs.
Thanks again
Jeem
Can't thank you enough for this bit of info. Saved me hours, I'm sure.
In my newbie attempt to upgrade from 8.1 to 9.1 I was intent on following the upgrade instructions exactly - and was replacing all the files that had *.new files in /etc. I got to the passwd.new file and mistakenly figured that my 8.1 boot disks would allow me to get back in if there was a problem (yes, I suspected there would be a problem and did it anyway).
I'm thinking I should leave the shadow- file alone. ;-)
Quote:
Originally posted by jeempc This is how I did it:
At the boot prompt type
linux init=/bin/bash
It will present you with a root shell(how convenient). Then type
# mount -o remount,rw /
That mounts the / partition read write so the passwd command will write to the /etc/passwd file
Then type the passwd command
# passwd
Then remount read only
# mount -o remount,ro /
Then ctrl-alt-del
I found the answer in a book called Linux Server Hacks by Rob Flickenger.
It is published by O'REILLY
locking doors to your apartment once in a while would help .
Imagine putting on a bios password, allowing booting on hdd only, and then someone breaking into your house and stealing your box. Wonder how would he sell it
its not that hard to blank the comos chip so any passords for the bios will be killed, i hear it can be done with just a paperclip, so if you can, just 4get about passwords as there are a lot of way around them once you get local acess, i say bestcrypt looks good, no need to try and get a new FS runing
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.