On Tuesday, October 30, 2018 1:56 PM, Philip Guenther <guenther@gmail.com> wrote:
> On Mon, Oct 29, 2018 at 8:40 PM Joseph Mayer joseph.mayer@protonmail.com
> wrote:
>
> > After having changed /etc/login.conf I'd like to effectuate the
> > changes directly in the console, without doing a logout-relogin
> > cycle.
> > Running "ksh -l" does not effectuate login.conf changes but only
> > re-runs the profile script [1].
> > Running "login" asks for username and password which seems less
> > efficient than possible.
> > Is there any way to do this?
>
> Since changes to login.conf may mean raising/increasing hard limits, which
> can only be done by privileged processes, the only sure fire way to have
> login.conf changes take effect is to logout and log back in.
>
> Philip Guenther
Hi Philip,
Thanks for responding.
What about "su -l" [1]?
I understand that the privileged process aspect needs you to be root to
effectuate new login.conf changes.
If I'm root and do "su -l", will root's login.conf settings be applied?
su.c [2] uses setusercontext() [3], and because emlogin is 0,
LOGIN_SETRESOURCES is specified as flag, and so is LOGIN_SETUMASK -
meaning login.conf settings are indeed effectuated by root doing
"su -l" (relogin as root) or "su -l someuser" (login as someuser).
Correct?
Joseph
No comments:
Post a Comment