How to get the systemd resolver to resolve local (i.e. unqalified) names?
Tom H
tomh0665 at gmail.com
Sun Jun 4 11:37:37 UTC 2017
On Sun, Jun 4, 2017 at 5:56 AM, Xen <list at xenhideout.nl> wrote:
> Tom H schreef op 04-06-2017 11:45:
>> On Sun, Jun 4, 2017 at 3:46 AM, Xen <list at xenhideout.nl> wrote:
>>>
>>> [Unit]
>>> Description=Send an email
>>>
>>> [Service]
>>> Type=oneshot
>>> ExecStart=/bin/su root -c '/usr/bin/mail -s changed root <
>>> /etc/resolv.conf'
>>
>> You don't need "/bin/su root". If you're really worried that it won't
>> default to "root" you can set "User=root".
>
> Actually I do. There is no way that it would be running under anything other
> than root. Anything other than root doesn't have root permissions, and I was
> running this from /etc/systemd/system/ and not some user file.
>
> Without the su, the mail command simply didn't do a thing.
>
> I don't know why. It is just my hack around something that doesn't work.
>
> I didn't need it to be root either. I could send it as my user as well (but
> that would put a username in the example).
>
> Consequently you also don't need to run it as root, you can make it into a
> personal service:
>
> $HOME/.config/systemd/user
>
> But I deleted the files again already and can't test now.
>
> The thing just didn't work.
It doesn't make sense because root is the default user for units under
"/{lib,etc}/systemd/system/" but if you say that it didn't work, it
didn't work.
More information about the ubuntu-users
mailing list