forums.xandros.com Forum Index forums.xandros.com
Xandros User Forums
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Forgot your root password?

 
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Tips & Tricks
View previous topic :: View next topic  
Author Message
Davepet
Xandros Community Moderator
Xandros Community Moderator


Joined: 24 Nov 2002
Posts: 8054
Location: Northern California

PostPosted: Fri Jun 16, 2006 2:17 am    Post subject: Forgot your root password? Reply with quote

Thanks to eheintz for originally posting this fix:

Reboot your system.

When the LILO (pretty, shiny) splash screen comes up showing you your boot options, hit CTRL-I. This will get rid of the shiny screen and drop you at a LILO console

Hit TAB to list your image options. Mine are as follows, yours will be different. Mine is a dual boot of Business + WinXP:

Xandros_Desktop_OS_3_Business
Safe_Video_Mode
Configure_(Expert)
Windows_XP

Make sure you have no whitespace after the prompt (blank space), pick an appropriate boot image (I use the Configure_(Expert) option since it's the shortest and it works)

Configure_(Expert) init=/bin/bash

This should ultimately drop you at a console prompt, as root, without a password and your / filesystem mounted. In my case it happens almost immediately as I'm on a laptop and the system tries to mount my suspend file located in the swap partition which isn't available yet.

At the console type:

passwd

enter the new password for root, then confirm it. then type:

reboot


That's it.
_________________

Friends don't let friends use windows
GLPW
Registered Linux User #301200
Back to top
View user's profile Send private message
Fargo
Xandrosianling
Xandrosianling


Joined: 19 Jan 2005
Posts: 274
Location: USA

PostPosted: Tue Apr 03, 2007 1:06 pm    Post subject: Reply with quote

WOW. This sounds like a bit of a security issue to me. I've seen articles and even a video on YouTube demeaning Windows Vista for a security breach that was a lot more difficult to get around than this is. Are we Linux users biased. Is Windows not as bad as its made out to be?
_________________
Goodbye my friends. I wish Xandros well. Be wary of Microsoft, they are not your friend. See you at PCLinuxOS or Mepis.
Back to top
View user's profile Send private message
TekMate
Xendrosian
Xendrosian


Joined: 20 Feb 2003
Posts: 1092
Location: MA

PostPosted: Tue Apr 03, 2007 1:25 pm    Post subject: Reply with quote

Fargo wrote:
WOW. This sounds like a bit of a security issue to me. I've seen articles and even a video on YouTube demeaning Windows Vista for a security breach that was a lot more difficult to get around than this is. Are we Linux users biased. Is Windows not as bad as its made out to be?


There is no such thing as security if a person has physical access to your machine. This is why companies have employees save to the network so they can protect as well as backup the data. I use ERD commander at work to change Windows passwords at least a few times a week it is as easy as the above procedure. You can set a bios password, a power on password, and a lilo password to make it much harder for an intruder but truthfully if I sit down at your machine it doesn't matter if you are running Windows, Linux, or a Mac I can gain access in a few minutes. Physical secerity is as important as any other.
_________________

If you were offered the chance to learn the truth…would you take it?
Back to top
View user's profile Send private message Visit poster's website
Fargo
Xandrosianling
Xandrosianling


Joined: 19 Jan 2005
Posts: 274
Location: USA

PostPosted: Tue Apr 03, 2007 1:32 pm    Post subject: Reply with quote

Thanks for the reply. Thats good to know. I guess I thought Linux had better security at every measure. Is Linux more difficult to get into than Windows if you don't have physical access? Or will it all depend on the security software each is running?

I'm just curious. I work out of my house so my physical security is not an issue. But I suppose others could still hack on to my machines from the internet. So I was curious as to how Windows and Linux compare. Let me know if I need to start a new thread. I realize this is a bit off topic.
_________________
Goodbye my friends. I wish Xandros well. Be wary of Microsoft, they are not your friend. See you at PCLinuxOS or Mepis.
Back to top
View user's profile Send private message
TekMate
Xendrosian
Xendrosian


Joined: 20 Feb 2003
Posts: 1092
Location: MA

PostPosted: Tue Apr 03, 2007 2:14 pm    Post subject: Reply with quote

As long as you take reasonable precautions Linux is usually more secure but truthfully I run Windows boxes that are secure and stable as well. Most systems need an adminstrator to be setup properly someone that knows what to patch and when to patch it. As long as you don't (and this counts on all OSes) downoad suspicious software or run programs on strange websites you should be OK. I run my Windows boxes like my Linux ones as a user not an admin and they never get infected because the user doesn't have rights to change system files. Most people don't like having to put in passwords or login as another user to install software but I am used to it and I don't mind the extra work to be more secure.
_________________

If you were offered the chance to learn the truth…would you take it?
Back to top
View user's profile Send private message Visit poster's website
ggvrsn
Xandrosian
Xandrosian


Joined: 12 Jun 2004
Posts: 188
Location: MD, USA

PostPosted: Sat Apr 28, 2007 4:00 pm    Post subject: Reply with quote


Davepet,
Here is what I do if I forget the root password or if the shell or shadow file is bloched. In reality, in my 12 years as a system admin, I had to do this only 2 or 3 times, when I inherited servers and was given the wrong password.

For Xandros or Linux, changing root password is very easy. Place the Xandros Installation CD in the CDROM reboot the PC. Press Spacebar when the menu comes up. Choose Rescue/Command prompt from the menu. Once you get the command prompt, mount the root partition on /mnt

Example:

Code:

# mount /dev/hda1 /mnt

# chroot /mnt /bin/sh

This will make the /mnt the current root.

# passwd

Change to whatever password you want.





-GGR

_________________
--
Registered Linux User #305688.
Back to top
View user's profile Send private message MSN Messenger
kutch
Xplorer


Joined: 29 Oct 2007
Posts: 1
Location: Qatar

PostPosted: Tue Apr 01, 2008 2:30 am    Post subject: Security with Linux? Reply with quote

Yeah if you are really want to secure they encrypt your LVM
http://www.debian-administration.org/articles/469

I use dm-crypt / LUKS works perfect and it is impossible to cracked in..... I use may laptop with a lot of pirated videos programs etc etc and once federal checked in my laptop you just say piss off crack it hahahah

So now you will still say linux is not secure?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
cindi deltan
Guest





PostPosted: Fri Feb 19, 2010 2:28 am    Post subject: Re: Security with Linux? Reply with quote

Some tips for Linux users have forgot the root passwords


0. Some newsgroups letters.
See, for example, the letters on the Dejanews:
It really has happened.
Really exposes a security hole.
Root password stupidity problem!

Every day fetchs many poor users forgot the password.
It may be found a few thousands letters on this subject.

1. Boot your miniroot
Boot your miniroot by diskets bootdisk and rootdisk.
If you haven't these diskets you can try download they from
Sources for distribution bootdisks (Slackware, Redhat or Debian mirrors).

Download these image disks on your Windows ( or whatever ) hard disk
and after that you can create these two diskets by program rawrite.
If you haven't this program you can also download it here with source and docs.
It maybe, that this diskets don't contain configuration you computer need.
Then configure these diskets by distributive Linux CD.

See HOWTO by Tom Fawcett and Graham Chapman for more details
about boot and root disks.
Boot and Root disks
Bootdisks and the boot process.


2. Mount the disk.
Mount your Linux disk to mountpoint, for example /mnt

mount /mnt /dev/hdb3

Now you can go to the mounted disk

cd /mnt

Search there one of well known Unix utilities vi or sed or mv.
The best way to use vi. But maybe you can't run vi due to some problems.
For example, vi uses some share libraries ( /etc/ld.so.conf )
which aren't on the mounted disk.


3. What your need to edit
Try now to edit your file /etc/passwd by vi or sed. But, attention!
Your file /etc/password is in fact /mnt/etc/passwd. You need to edit
the line contains the word "root". For example, if your /etc/passwd
contains the line

root:x3FrTg6uYT7.:0:0:root:/:/bin/sh

edit it and blank out the password field to the next:

You should be able to login as root and you needn't any password for root.
After that, don't forget to change your root password to new one.
It maybe done by Linux utility passwd.


4. How to do by sed
If your attempt to use vi was unsuccessful, try sed.
Here there is the format of the command sed you need:

For more details about sed see
Sed, a stream editor
Getting Started with Sed
Introduction to Unix's SED editor


5. How to do by other username
So, maybe you have any other non-root username and you do remember
the corresponding password. Then you needn't vi and sed.
Reboot your Linux and login with this other username.
Copy /etc/passwd to your local directory, save it for safety, edit it.
Now reboot to miniroot by bootdisk and roodisk, mount disk
and restore your /etc/passwd file from local directory.
If all these advices doesn't help try any crack program ...
Back to top
gingir
Xplorer


Joined: 18 May 2013
Posts: 8

PostPosted: Sat May 18, 2013 9:32 am    Post subject: Reply with quote

this OS is certainly interesting but for everyday stuff I am all for centos Very Happy
_________________
If you want to travel around the world and be invited to speak at a lot of different places, just write a Unix operating system. Free hosting
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Tips & Tricks All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group