LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   root locked out (https://www.linuxquestions.org/questions/linux-software-2/root-locked-out-145204/)

marghorp 02-12-2004 07:58 AM

root locked out
 
I have changed permissions to all files on the hard drive to 000. Stupid thing to do, but now I can't change it back, since I have restarted the computer and I can't login again as root or any other user.

I get a GDM error permissions should be set to 750. But How can I change them back if I can't login?

Thanks

Frustin 02-12-2004 08:12 AM

single user mode?

at bootloader prompt type:

kernel_name single (if using lilo)

this will give you a prompt.

marghorp 02-12-2004 08:42 AM

still locked out
 
I am using grub on RH9.

I went into grub command prompt and run "find /boot/grub/grub.conf" and it got me file not found

I come to runlevel 5 and services start up just fine, it's just that I can't login anymore. The error I get is (I will retype it here:):

Server authorization Directory (daemon/DervAuthDir) is set to /var/gdm but has the wrong permission. Permissions should be set to 0750. Please correct the permissions or configuration /etc/X11/gdm/gdm.conf and restart gdm.

I know what I should do, because it says so in the message. But I can't login as root or any other user as I get "Login Incorrect". That's because of changed permissions probably it can't read the login files.

Help!

Thanks!

RHELL 02-12-2004 12:47 PM

Not sure about RH9, but try this.
On boot, hit 'e' at the splash screen(or wherever RH9 asks you to interfere with grub or select a kernel to boot).
edit the 'kernel*blahblah*' line, add an s(or 1) at the end, and boot.
check by typing 'runlevel', might return 'unknown' on that distro.

marghorp 02-12-2004 05:48 PM

Saved
 
Thanks guys!

I typed 'a' at GRUB menu, and added single to kernel at boot, which got me into the system as single user and I changed the permissions back, so that everything works now. Except one thing. X doesn't work. Some bad permissions and some missing files. I understand the bad permissions, but where did the missing files go?

Is there a way I can reinstall X?

Does anyone know how to do that? I think it will be easier than finding all the bad permissions and missing files.

ajcamp 05-17-2007 10:39 AM

Root locked Out by PAM
 
Hi,

I locked out root user login by creating a PAM sshd.deny file.
How can I get root access?

Here's what I did -

1. vi /etc/pam.d/ssh
added the line:
auth required pam_listfile.so item=user sense=deny file=/etc/ssh/sshd.deny onerr=succeed

2. created /etc/ssh/sshd.deny with a user acct to block on the first line
blocked_user

3. service sshd restart

Now I can log in with my personal account, but cannot login as root.
I can't su - either.

!!!!!!!

Thanks for any help
AJ

AlbinoJap 05-17-2007 02:28 PM

Boot the machine into single user mode and modify the PAM config file.


All times are GMT -5. The time now is 01:09 PM.