Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #212619 > unrolled thread

revise the /etc/security/limits.conf doesn't take effect for normal user.

Started byHongyi Zhao <hongyi.zhao@gmail.com>
First post2019-08-11 05:40 +0200
Last post2019-08-13 00:10 +0200
Articles 7 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  revise the /etc/security/limits.conf doesn't take effect for normal  user. Hongyi Zhao <hongyi.zhao@gmail.com> - 2019-08-11 05:40 +0200
    Re: revise the /etc/security/limits.conf doesn't take effect for  normal user. Emmanuel Gelati <emi2fast@gmail.com> - 2019-08-11 11:20 +0200
      Re: revise the /etc/security/limits.conf doesn't take effect for  normal user. Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-12 15:40 +0200
        Re: revise the /etc/security/limits.conf doesn't take effect for   normal user. Hongyi Zhao <hongyi.zhao@gmail.com> - 2019-08-13 00:10 +0200
        Re: revise the /etc/security/limits.conf doesn't take effect for   normal user. Hongyi Zhao <hongyi.zhao@gmail.com> - 2019-08-13 00:10 +0200
          Re: revise the /etc/security/limits.conf doesn't take effect for  normal user. Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-13 15:20 +0200
        Re: revise the /etc/security/limits.conf doesn't take effect for   normal user. Hongyi Zhao <hongyi.zhao@gmail.com> - 2019-08-13 00:10 +0200

#212619 — revise the /etc/security/limits.conf doesn't take effect for normal user.

FromHongyi Zhao <hongyi.zhao@gmail.com>
Date2019-08-11 05:40 +0200
Subjectrevise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<ytMS5-qm-1@gated-at.bofh.it>
Hi,

I added the following lines into /etc/security/limits.conf:

* - nofile 65535
root - nofile 65535


But it still not take effect for the normal user.

Any hints?
-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.

[toc] | [next] | [standalone]


#212627 — Re: revise the /etc/security/limits.conf doesn't take effect for normal user.

FromEmmanuel Gelati <emi2fast@gmail.com>
Date2019-08-11 11:20 +0200
SubjectRe: revise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<ytSb7-4Wn-1@gated-at.bofh.it>
In reply to#212619

[Multipart message — attachments visible in raw view] — view raw

check if you are using pam_limits module

grep -i limit /etc/pam.d/*

Il giorno dom 11 ago 2019 alle ore 05:30 Hongyi Zhao <hongyi.zhao@gmail.com>
ha scritto:

> Hi,
>
> I added the following lines into /etc/security/limits.conf:
>
> * - nofile 65535
> root - nofile 65535
>
>
> But it still not take effect for the normal user.
>
> Any hints?
> --
> .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
>
>

-- 
  .~.
  /V\
 //  \\
/(   )\
^`~'^

[toc] | [prev] | [next] | [standalone]


#212684 — Re: revise the /etc/security/limits.conf doesn't take effect for normal user.

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2019-08-12 15:40 +0200
SubjectRe: revise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<yuiIj-4R4-35@gated-at.bofh.it>
In reply to#212627
> Il giorno dom 11 ago 2019 alle ore 05:30 Hongyi Zhao <hongyi.zhao@gmail.com>
> ha scritto:
> 
> > Hi,
> >
> > I added the following lines into /etc/security/limits.conf:
> >
> > * - nofile 65535
> > root - nofile 65535
> >
> >
> > But it still not take effect for the normal user.

How are you logging in?  How are you checking?


On Sun, Aug 11, 2019 at 11:17:37AM +0200, Emmanuel Gelati wrote:
> check if you are using pam_limits module
> 
> grep -i limit /etc/pam.d/*

For a console login, the relevant file is /etc/pam.d/login which, on
buster, contains:

# Sets up user limits according to /etc/security/limits.conf
# (Replaces the use of /etc/limits in old login)
session    required   pam_limits.so


So, that would be the first step I would try: make sure you are doing
a regular CONSOLE login (not a graphical login, not ssh), don't run
startx or anything like that, and verify your limits in the console
login shell.

I just tried it now, on buster, and it worked for me.

If you verify that this works, but you're still having problems in
whatever OTHER thing you are doing that you haven't described to us
yet, then try telling us what you're doing.

Bear in mind that the PAM limits are only applied to PAM sessions that
use the appropriate configurations.  For example, a console login uses
/etc/pam.d/login which has this configuration.  An ssh login uses
/etc/pam.d/sshd which also has this configuration.  A graphical (display
manager) login ... who knows?  Debugging DM logins can be tricky.  You
could start by telling us which DM it is (lightdm, gdm3, sddm, etc.).
You can verify whether that particular DM is using a PAM configuration
that uses the limits.conf file, and possibly edit the PAM configuration
if needed.

On top of that, it's possible that your Desktop Environment, if any,
may be overriding your resource limits.  Or, you may be launching a
terminal through a non-traditional method (like GNOME does, using dbus
to launch terminals), which means your terminals do not inherit the
resource limits from your X or Wayland session.  (GNOME is written
by and for aliens, not Unix people.)

And beyond that, it's quite possible that you are laboring under some
serious misunderstandings about how resource limits work.  Maybe you
thought they would apply to daemons that are started by systemd, or to
cron jobs that you created.  They don't.  PAM resource limits are only
imposed on PAM sessions.  Not systemd services, not cron jobs, etc.

That's why you need to TELL US WHAT YOU ARE DOING.

[toc] | [prev] | [next] | [standalone]


#212715 — Re: revise the /etc/security/limits.conf doesn't take effect for normal user.

FromHongyi Zhao <hongyi.zhao@gmail.com>
Date2019-08-13 00:10 +0200
SubjectRe: revise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<yuqFP-1CL-5@gated-at.bofh.it>
In reply to#212684
On Mon, 12 Aug 2019 15:40:03 +0200, Greg Wooledge wrote:

>  You
> could start by telling us which DM it is (lightdm, gdm3, sddm, etc.).

gdm3

And I don't know to let the limits take effect within this environment.

Regards
-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.

[toc] | [prev] | [next] | [standalone]


#212716 — Re: revise the /etc/security/limits.conf doesn't take effect for normal user.

FromHongyi Zhao <hongyi.zhao@gmail.com>
Date2019-08-13 00:10 +0200
SubjectRe: revise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<yuqFP-1CL-9@gated-at.bofh.it>
In reply to#212684
On Mon, 12 Aug 2019 15:40:03 +0200, Greg Wooledge wrote:

>  You
> could start by telling us which DM it is (lightdm, gdm3, sddm, etc.).

gdm3

And I don't know to let the limits take effect within this environment.

Regards

[toc] | [prev] | [next] | [standalone]


#212741 — Re: revise the /etc/security/limits.conf doesn't take effect for normal user.

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2019-08-13 15:20 +0200
SubjectRe: revise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<yuESu-2nn-7@gated-at.bofh.it>
In reply to#212716
On Mon, Aug 12, 2019 at 09:58:14PM +0000, Hongyi Zhao wrote:
> On Mon, 12 Aug 2019 15:40:03 +0200, Greg Wooledge wrote:
> 
> >  You
> > could start by telling us which DM it is (lightdm, gdm3, sddm, etc.).
> 
> gdm3
> 
> And I don't know to let the limits take effect within this environment.

I don't either.

First thing you can do is look for a file like /etc/pam.d/gdm3 (or possibly
/etc/pam.d/gdm), and see if it contains the pam_limits.so line.  If
it doesn't, then you know it isn't reading /etc/security/limits.conf
file, and your first step would be to add the pam_limits.so line.
VERY carefully, after reading all of the PAM documentation.

If it does contain this line, then perhaps you can try running a standard
Debian X session instead of a GNOME session.  Pick your favorite regular
window manager that is NOT part of a desktop environment, put that in
your ~/.xsession file, login with a Debian session, open a terminal, and
see if the limits are correct.  Then remove the ~/.xsession file (or
restore it to whatever it was before) to go back to the way things were
before, if you still want to.

If the limits are correct in a terminal executed by a regular window
manager inside a Debian session, then you know the PAM stuff is working
correctly.  If they're NOT correct inside a terminal executed by dbus
inside a GNOME session, then you have some more digging to do.  It's
possible that they're working just fine in other pieces of your GNOME
session, just not in terminals.  It's possible that you may or may not
care about terminals, or that you may or may not care ONLY about terminals.
You're not exactly giving us much detail here.

[toc] | [prev] | [next] | [standalone]


#212717 — Re: revise the /etc/security/limits.conf doesn't take effect for normal user.

FromHongyi Zhao <hongyi.zhao@gmail.com>
Date2019-08-13 00:10 +0200
SubjectRe: revise the /etc/security/limits.conf doesn't take effect for normal user.
Message-ID<yuqFP-1CL-7@gated-at.bofh.it>
In reply to#212684
On Mon, 12 Aug 2019 15:40:03 +0200, Greg Wooledge wrote:

>  You
> could start by telling us which DM it is (lightdm, gdm3, sddm, etc.).

gdm3

And I don't know to let the limits take effect within this environment.

Regards
-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web