[Samba] Suggestion for clarification in the manual page for smb.conf re preexec & admin users

Rowland penny rpenny at samba.org
Mon Feb 1 13:00:00 UTC 2021


On 01/02/2021 12:42, Peter Eriksson via samba wrote:
> I just noticed that ‘preexec’ scripts are run as the user connecting. Unless that user is in the “admin users” list. Then it will be run as user root…
>
> Now, in retrospect this isn’t so surprising since ‘admin users’ will do all file operations as root but it still wasn’t obvious to me from reading the manual page.
>
> Perhaps adding a notice in the “admin users” section that it not only affects file operations but also “preexec” (and possibly “postexec” - haven’t tested that)?
> (And also perhaps a notice under the “preexec” section)?
>
> - Peter
>
>

In a roundabout way it is documented in 'man smb.conf'. There is is also 
the 'root preexec' parameter and in 'man smb.conf' it says this:

This is the same as the preexec parameter except that the command is run 
as root.

Which implies that the 'preexec' is run as a normal user.

Of course patches to improve the documentation are always welcome 😁

Rowland





More information about the samba mailing list