You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, July 19th 2003, 6:06am

Need to find/change root password

I am an extremely novice Unix user here, as in this is my first. It was owned by someone else and they created a root password that I have no idea what it is nor how to either access or change it.

Is there any documentation anywhere on how to do this or can someone tell me the steps to accomplish this? I have looked everywhere and can't find any help on this.

I am comfortable working in terminal mode as this is simular to DOS if this is where it needs to be done at.

Can anyone help me?

2

Saturday, July 19th 2003, 10:57am

It doesn't surprise me that you haven't found any documentation about this, since I believe this cannot be done at all!!

If you, as a regular user, can manipulate the root password it is of course a huge security risk, as you gain access to the whole system. So if you do not know the root password, I'm afraid there is no way to change it :( (that I know of...)
Beware of computer programmers that carry screwdrivers.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

3

Saturday, July 19th 2003, 12:54pm

You have to boot into a single user system and change the root password as usual with passwd.

There should be a rescue option on the bootdisk or CD you installed from.

I think there is also an option to pass certian parametes to the kernel when booting by Lilo.

Cheers,
_
Qt/KDE Developer
Debian User

4

Saturday, July 19th 2003, 2:37pm

Quoted

Original von RobbiK

If you, as a regular user, can manipulate the root password it is of course a huge security risk, as you gain access to the whole system.


This reasoning is correct for a running system. But most
computers allow these security measures to be circumvented
if you have physical access to the machine (e.g. if you can
reboot it with a rescue disk or CD).
This is important in an emergency situation like this.
-> See also the reply by anda_skoa.

5

Saturday, July 19th 2003, 4:27pm

No disks

Unfortunately there is no rescue or boot disk. This machine does not have a floppy drive or internal cd. I would have to attach an external cd which I don't have nor would it do any good if I did, without a system cd.

Any way to boot to single user without a disk? This is a stand alone machine at home and is an Intel Dot.Station with KDE interface if that rings any bells with anyone.

6

Saturday, July 19th 2003, 6:25pm

So you are running Linux, if you are successfully running KDE on Unix please let me know :D.
If you use LILO as your bootloader I guess you could check this out: http://www.hackinglinuxexposed.com/articles/20020702.html
Beware of computer programmers that carry screwdrivers.

7

Sunday, July 20th 2003, 12:04am

Re: No disks

Quoted

Original von boliati

Any way to boot to single user without a disk?

See
http://www.linuxadvisory.com/tutorial5.html
There's also a solution if you use grub as your boot loader.

8

Sunday, July 20th 2003, 1:08am

Now at .....passwd:Authentication token manipulation error.

I have done some digging around on some sites and have made it to Lilo and typing in "passwd root" and it asks for a new password (this is the condensed version of what I did). No matter what I type in I get the error: passwd:Authentication token manipulation error.

What am I missing or should be checking so I can set a new root password?

I am a totally new linux user (that's why I mixed up linux and unix i my earlier post!) so if you could, be as specific as you can in describing any solutions.

Thanks

9

Sunday, July 20th 2003, 4:43am

Have also tried at Lilo typing linux single and I get to this prompt:

'Give root password for system maintenance'

I have to know the root password to get past this........Back to square one again.

I read something on the /etc/shadow/ and /etc/passwd/ files......is it that these may have been edited by the former user and reinforced so that accessig the root is not possible without the password? Maybe I'm just grasping at straws here.

10

Sunday, July 20th 2003, 7:53am

Re: Now at .....passwd:Authentication token manipulation err

Quoted

Original von boliati

I have done some digging around on some sites and have made it to Lilo ....
....
I am a totally new linux user (that's why I mixed up linux and unix i my earlier post!) so if you could, be as specific as you can in describing any solutions.

So you're using lilo.
I'm sorry, I can't try out any solutions for you and
provide a step-by-step descripion as I use grub.

Quoted

Original von boliati


I read something on the /etc/shadow/ and /etc/passwd/ files......is it that these may have been edited by the former user and reinforced so that accessig the root is not possible without the password?

Well, these are the files where the system stores user and
password information. In /etc/shadow you should normally find
the crypted passwords. That's where the passwd command writes to.

Your problem is that this file is only writeable by root (of course,
for security reasons) or via a command with special privileges
(the passwd command is "set uid root"). This special privilege
of passwd won't help in your situation because it's
the *root* password you want to set.
Doing so requires you to be root.
So in order to fix your problem you have to become root.
That's what all the suggested solutions were about...


Quoted

Original von boliati


Have also tried at Lilo typing linux single and I get to this prompt:
'Give root password for system maintenance'
I have to know the root password to get past this........Back to square one again.

Have you tried to just press enter at this prompt?
If it asks you for the real root password (the one you don't know)
then your system differs from the ones described in the article
linked above.




If nothing else helps there's at least two things that you could try:
1.
- write down where your /etc/shadow is located
(in the file /etc/fstab, look for the line that has a single slash in the
second column. that should be it, typically something like
/dev/hda<number>)
- since you don't have a system disk you
can get a copy of Knoppix on CD(-R)
- Attach a CDROM (you must be able to boot from it, or it won't work)
- boot it
- become root (no passwd)
- mount the disk the /etc/shadow is on
- make a backup copy of /etc/shadow
- edit the original and remove the crypted
passwd for the root user
(everything between the first and second colon).
Example:
original line:
root:SADGFASgfde45ยง$dfgsdfgsdfg:11993:0:::::
new line:
root::11993:0:::::
- save the file
- reboot normally (remove the Knoppix CD!)
- log in as root with the now empty password
- use the passwd command to set a new one

2.
Physically move your hard disk to a different computer
where you are root (or one of your friends :-)).
Then mount the right partition and proceed as above.

11

Tuesday, July 22nd 2003, 10:35pm

Fixed

Had to resort to #2, but it worked and all is well now.

I want to than everyone for their help!