pam_open_session: Error in service module

0

I needed to edit /etc/security/limits.conf to add the line "tomcat hard nofile 7168" so was planning on keeping the original and editing a copy:

$ sudo mv /etc/security/limits.conf /etc/security/limits.conf.20220708
$ sudo cp /etc/security/limits.conf.2* /etc/security/limits.conf
sudo: pam_open_session: Error in service module
sudo: policy plugin failed session initialization
$

I cannot su to root (no passwords) and on opening a connection from the AWS console (https://eu-west-3.console.aws.amazon.com/ec2/v2/connect/root/i-091336859aa81c170) I see the connection happening but it then hangs without a prompt nor accepting input.

Please advise!

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions