Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Admin password SuSE 9.1

  • 26-11-2004 3:57pm
    #1
    Registered Users, Registered Users 2 Posts: 1,821 ✭✭✭


    I just installed suse 9.1 and it didn't ask me for an admin password(only time it did and i had to crash pc cause mouse wasn't working+couldn't click next and enter a pass.) For some reason suse thinks i have entered a password and now i can't log on to it... Any suggestions where i could change the pass in windows/command prompt or before suse loads?


Comments

  • Closed Accounts Posts: 210 ✭✭deimos


    What boot loader are you using?
    If its lilo then at the lilo ui type
    linux 1

    This will drop you to a root shell.



    If its not lilo then try using one of those linux floppy distro's and mount the partition and change it, an example would be lsof, I think thats what it was caleld but its a long time since ive used it.....


  • Registered Users, Registered Users 2 Posts: 1,821 ✭✭✭Skud


    thanks i'll try that. I got another error too.. My hard disk is dropped in size from a 75gb to a 29.6gb?!? Could the installation of suse done this? if so how would i fix it?


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Skud wrote:
    (only time it did and i had to crash pc cause mouse wasn't working+couldn't click next and enter a pass.)
    Happened to me too with my wireless desktop. Next time just use the keyboard to tab down the screen to the mouse section and try a few alternatives, you can test them as you go.

    adam


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    Skud wrote:
    I just installed suse 9.1 and it didn't ask me for an admin password(only time it did and i had to crash pc cause mouse wasn't working+couldn't click next and enter a pass.) For some reason suse thinks i have entered a password and now i can't log on to it... Any suggestions where i could change the pass in windows/command prompt or before suse loads?
    If you need to reset the root password you can do this with a live CD like Knoppix. All you do is boot into Knoppix and switch to root. It's Knoppix's root so it doesn't ask you for a password. Then mount your harddisk and go into the /etc directory on your harddisk. You need to change the passwd and shadow files.

    In the passwd file you should have something like "root:x:0:0:root:/root:/bin/bash", just delete the "x". In the shadow file you should have a line like: "root: (whole bunch of crazy character here):" You need to detete all those character between the 1st and 2nd ":". Now reboot you machine and login as root. You will not ba asked for a password, since you have effectivly disabled it. You need to set a new root password. Type "passwd" to set a new one.

    So why does this work? Well it's all to do with how Linux stores passwords. The "shadow" file contains 'hashs' of what your password is. A hash is a scrambling of your password that can be very easy to calculate but designed to be very difficult to go the other way (ie hash -> password), ie it's a one-way function. That's what the bunch of crazy characters in the shadow file were. The "x" in the passwd file bascially says to use the hash stored in the shadow file. By deleting both as I described you delete the password.


  • Moderators, Sports Moderators Posts: 8,679 Mod ✭✭✭✭Rew


    Suse 9.1 uses Grub as a boot loader.

    Recover the pass by booting a rescue system off the CD's (basically choose a non-graphical install and its an option on the menu).

    This will boot a system off the CD and give you a prompt.

    Next mount the partition that has /etc on it

    eg:

    mount /dev/hda1 /mnt/etc

    You will have to create /mnt/etc first though (mkdir /mnt; mkdir/mnt/etc)

    if you dont know which partition its on, mount em all id say :)

    fdisk -l

    will list all the partitions

    Now you can go in and edit the shadow file by hand
    Basically edit /mnt/etc/shadow and remove the wncryped password (or replace it with a known one)

    "nP2l/KxjVrSK6" is a hash for "password"
    so in the shadow:

    root:nP2l/KxjVrSK6:12440:0:10000::::

    Hope this helps, iv had to do it once or twice my self...


  • Advertisement
  • Moderators, Sports Moderators Posts: 8,679 Mod ✭✭✭✭Rew


    Oh and make backups of passwd and shadow BEFORE you do anything!


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    Hmmm... sounds familiar. *poke*


  • Moderators, Sports Moderators Posts: 8,679 Mod ✭✭✭✭Rew


    Syth wrote:
    Hmmm... sounds familiar. *poke*

    Actually if you follow your method to the letter it will never ask you for a root password again no matter how many times you set it with passwd. Ill leave you to figure out why....

    ;)


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    Rew wrote:
    Actually if you follow your method to the letter it will never ask you for a root password again no matter how many times you set it with passwd. Ill leave you to figure out why....

    ;)
    I think it may be becuase of the "x" in passwd.

    I really should have mentioned that this is the method I used for my RedHat 9 box.


  • Moderators, Sports Moderators Posts: 8,679 Mod ✭✭✭✭Rew


    Syth wrote:
    I think it may be becuase of the "x" in passwd.

    I really should have mentioned that this is the method I used for my RedHat 9 box.

    Aye, thats it. There is no need to take the "x" out of /etc/passwd as its the x that causes the reference to /etc/shadow. Once the password is changed or deleated in there the job is done. All though if you take the "x" out of passwd and leave shadow it will disable the password as well. But passwd only changes the pass in shadow. vipw will probably shít its self if the "x" is missing though.


  • Advertisement
Advertisement