Error in service module

The /etc/security/limits.conf file was under the repos.d directory and I deleted it. Then I realized that my server was down.

hostname login:

Not Parsed Code Block

When I want to log in I get error in service modeule error.

I can't run a command because I can't log in with my root user. How can I fix the problem?

Can I start with iso and say fix problem?

I don't understand it, but might be unrelated to your problem.

The error message "error in service module" is from PAM.
Boot your system to a single-user mode or maintenance mode or rescue mode.
Do you get a grub screen during booting? Hit cursor-up and cursor-down keys and enter the maintenance mode.
There you should get a root (#) prompt.

I opened it in rescue mode but it threw me back to the same screen.

oracle linux server 7.9

hostname login :

I booted using iso. etc/selinux/config file is empty.

but I can't login with vi. it gives segmentation fault error

sh-4.2# pwd
/etc/selinux

sh-4.2# ls
config targeted tmp

I solved the problem using live iso.

I booted with the iso and then mounted my / directory on the server and threw the relevant file (I attached usb to the server) to the server.

Problem solved

Well done :+1:
Which "relevant file"?

1 Like

The file /etc/security/limits.conf limits.conf was deleted. It was fixed when I put the file in the directory.

I was updating the server and editing the repo files, I don't understand how I accidentally deleted this file.

1 Like

Hmm, this file is consulted by PAM.
If missing, PAM should not crash, but give error message and continue with the current/inherited limits.
I suspect a bug.