Web lists-archives.com

Re: bind gets permission errors in buster--systemd-related?




On Wed, May 15, 2019 at 12:11:58PM -0400, Lee wrote:
> The way I fixed my permission problems after telling bind to log to a
> file instead of syslog was
>   su -
> to become root
>   su bind
> which didn't work because
>   # grep bind /etc/passwd
>   bind:x:116:119::/var/cache/bind:/bin/false
> so edit /etc/passwd and change '/bin/false' to '/bin/sh'
>   su bind
> then worked, so
>   /usr/sbin/named -g
> to see all the errors.  Adjust permissions, start bind as a daemon and
> edit /etc/passwd to change '/bin/sh' back to '/bin/false'

If sudo is installed, you can simply do

sudo -u bind -s

to start a shell as that user despite what /etc/passwd says.  Of course,
you need permission to use sudo.