pam :как ограничить правила пользователями, не -root

Возможно, внутри среды chroot эта команда отсутствует на вашем пути.

Пожалуйста, попробуйте внутри chroot:

/sbin/mkinitcpio -p Linux

и, если это не сработает,

/usr/sbin/mkinitcpio -p Linux

и сообщите нам, если это не сработает.

1
08.06.2021, 22:41
1 ответ

Должна работать комбинация success=1иpam_rootok.so:

auth [success=1,default=ignore] pam_rootok.so
auth        optional    MODULE

Изman 5 pam.conf:

For the more complicated syntax valid control values have the
following form:

         [value1=action1 value2=action2...]

Where valueN corresponds to the return code from the function
invoked in the module for which the line is defined.
... The actionN can take one of the following forms:
...

N (an unsigned integer)
   equivalent to ok with the side effect of jumping over the
   next N modules in the stack. Note that N equal to 0 is not
   allowed (and it would be identical to ok in such case).

Таким образом, success=1должен заставить PAM пропустить MODULE, если pam_rootok.soзавершится успешно (, что будет, когда пользователь является root ).

2
28.07.2021, 11:26

Теги

Похожие вопросы