Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an assignment.

Now I cannot login as Geeko (non-root user) or Root. Any way to fix this? I thought I could get to the console with a Alt+F2 etc... But that does not work...

I am running Opensuze in VMware workstation no snapshot (of course).

Please help!

Here are the steps as written

  1. Log out of the KDE desktop environment.
  2. When the KDM login screen appears, log in with the following:

    Username: root
    Password: yourpassword
    Notice that you can log in as root without a root entry in the login screen.

  3. Log out again from the KDE desktop environment.

  4. Log in as geeko with a password of yourpassword.
  5. Open a terminal window and su to root.
  6. Open the file /etc/pam.d/xdm in a text editor.
  7. Add the following as the second line of the file:

    auth required pam_securetty.so

  8. Save and close the file.

  9. Log out and try to log in as root user at the KDM login screen again.
    The root login is denied.
share|improve this question

2 Answers 2

You should still be able to log in from another host as root via ssh. (You're not on the console, so pam_securetty.so doesn't get invoked.) Then, edit the file a second time to remove the line.

share|improve this answer
    
Thanks but I thought of that first. It would be ideal if the lesson prior was not to disable the outside connections for running a local web server with DNS etc.... Any other ideas? –  Campo Nov 6 '12 at 23:54

auth required pam_securetty.so only affect root user.

Login with a non-root user then use

sudo su -

to gain back root access.


VM1: The trouble VM

VM2: Another working VM with root access.

  1. Shutdown both VMs.
  2. Addn VM1 virtual disk into VM2 disk controller as a second disk.
  3. Start VM2.
  4. Gain root access.
  5. Mount VM1 disk.

    Let assume VM1 root partition is /dev/sdb1

    mkdir /mnt/sdb1
    mount /dev/sdb1 /mnt/sdb1
  1. Modify the file accordingly.
    vim /mnt/sdb1/etc/pam.d/xdm
  1. Shutdown VM2.
  2. Remove VM1 disk from VM2.
  3. Start VM1 and test.
share|improve this answer
    
Geeko is a non-root user sorry updated my post to be more specific –  Campo Nov 7 '12 at 5:20
    
That's strange. Did you try login with the text screen. Press "ALT-F1" or "CTRL-ALT-F1" should switch you to it. –  John Siu Nov 7 '12 at 5:27
    
It will not switch. I created a new vm and tried using the ALT-F1 or CTRL-ALT-F1 I can get it to work once I log out which brings me to the console and crashes KDE. It is very strange indeed..... I cannot startx without SUDO which then bring me into X as root. Only way back to KDE under non-root user is a reboot. Then tried the steps listed above and the same lockout issue occurred had to revert to a snapshot I took. –  Campo Nov 7 '12 at 6:55
    
Oh, I thought you don't have direct control of the VM. That makes thing much more simpler. I will update my answer. –  John Siu Nov 7 '12 at 6:59
    
I brought it to the teacher. He plugged in a physical keyboard switch tty and boom I was in! HAHA! –  Campo Nov 7 '12 at 16:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.