1

I am working on Ubuntu 16.04, I accidentally deleted the entire limits.conf entry. Is there any way to recover it?

muru
  • 197,895
  • 55
  • 485
  • 740

1 Answers1

4

On MY system, /etc/security/limits.conf is part of the libpam-modules:amd64 package:

$ dpkg -S /etc/security/limits.conf
libpam-modules:amd64: /etc/security/limits.conf

and I have the following packages installed:

$ dpkg -l libpam\*| grep -Ev '^un'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                       Version                Architecture Description
+++-==========================-======================-============-==========================================================
ii  libpam-cgfs                2.0.8-0ubuntu1~16.04.2 amd64        PAM module for managing cgroups for LXC
ii  libpam-gnome-keyring:amd64 3.18.3-0ubuntu2        amd64        PAM module to unlock the GNOME keyring upon login
ii  libpam-modules:amd64       1.1.8-3.2ubuntu2       amd64        Pluggable Authentication Modules for PAM
ii  libpam-modules-bin         1.1.8-3.2ubuntu2       amd64        Pluggable Authentication Modules for PAM - helper binaries
ii  libpam-runtime             1.1.8-3.2ubuntu2       all          Runtime support for the PAM library
ii  libpam-systemd:amd64       229-4ubuntu21.2        amd64        system and service manager - PAM module
ii  libpam0g:amd64             1.1.8-3.2ubuntu2       amd64        Pluggable Authentication Modules library

So I'd reinstall libpam-modules:amd64:

sudo apt-get install --reinstall libpam-modules:amd64

As my system might differ from yours, I must say YMMV.

waltinator
  • 36,399