User Tools

Site Tools


doc:appunti:linux:sa:nis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:linux:sa:nis [2020/12/16 12:27] – [NIS users unable to poweroff/reboot or manage printers] niccolodoc:appunti:linux:sa:nis [2020/12/16 16:22] – [NIS users unable to poweroff/reboot or manage printers] niccolo
Line 222: Line 222:
 </code> </code>
  
-====== NIS users unable to poweroff/reboot or manage printers ====== 
  
-We experienced a problem with an **Ubuntu 20.04** Focal Fossa used as **NIS client**: some tasks were inhibited because the user - despite it was **logged-in locally** on the physical machine - it was considered **as a remote** one. 
- 
-FIXME What the errors? 
- 
-It turned out that the **[[https://wiki.debian.org/PolicyKit|PolicyKit]]** authorization manager is enabled, according to the default policies that problematic tasks are reserved to **local users** only, whereas users **authenticated by the NIS** server are considered somehow remote. 
- 
-One solution is to create a file on the NIS client, name **/var/lib/polkit-1/localauthority/50-local.d/10-nis-users.pkla**. The ''/var/lib/polkit-1/localauthority/'' directory is intended for 3rd party packages, the ''50-local.d'' subdirectory is intended for local usage. 
- 
-<file> 
-[Allow Printer administration for NIS users] 
-Identity=unix-group:lpadmin;unix-group:adm 
-Action=org.opensuse.cupspkhelper.mechanism.* 
-ResultAny=yes 
- 
-[Allow halt power-off and reboot for NIS users] 
-Identity=unix-group:adm 
-Action=org.freedesktop.login1.halt*;org.freedesktop.login1.power-off*;org.freedesktop.login1.reboot* 
-ResultAny=yes 
-</file> 
- 
-The syntax of the file is explained into the **[[https://www.freedesktop.org/software/polkit/docs/0.105/pklocalauthority.8.html|pklocalauthority man page]]**. 
- 
-First of all usint the **Identity** option we select the users interested into that policy. For managing printers we required the user to belong to the **lpadmin** and **adm** groups. The first group is the standard Debian group to manage printers, whereas the **adm** group is an arbitrary group assigned to some users by the NIS server (see the page **[[https://wiki.debian.org/SystemGroups|Debian system groups]]**). 
- 
-FIXME Action, ResultAny and pkaction 
doc/appunti/linux/sa/nis.txt · Last modified: 2020/12/16 16:27 by niccolo