rndc-confgen: command not found

Bug #1594325 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Expired
High
Unassigned
2.0
Expired
High
Unassigned

Bug Description

$ rndc-confgen
Command 'rndc-confgen' is available in '/usr/sbin/rndc-confgen'
The command could not be located because '/usr/sbin' is not included in
the PATH environment variable.
This is most likely caused by the lack of administrative privileges
associated with your user account.
rndc-confgen: command not found

I discovered this when running bin/test.rack in a new and up-to-date
16.04 container, running as the ubuntu user. I'm puzzled as to why the
ubuntu user should not have /usr/sbin in PATH given that ubuntu can sudo
to root, i.e. it obviously has /some/ privileges.

$ groups
ubuntu adm dialout cdrom floppy sudo audio dip video plugdev netdev lxd
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin

A catch-all fix might be to refer to rndc-confgen by its full path when
MAAS calls it.

Tags: dns
Gavin Panella (allenap)
description: updated
Revision history for this message
LaMont Jones (lamont) wrote :

In ubuntu, non-root users do not have /usr/local/sbin, /usr/sbin, or /sbin in their path by default (though the user can override that.) Note that "sudo rndc-confgen" would work as well.

Assuming that it works in our case, then specifying the full path is the correct action.

Revision history for this message
LaMont Jones (lamont) wrote :

I expect that this needs to be fixed for 2.0 because there is some path that would trigger it. If that's not the case, and it's only testing, then we can drop the 2.0 target.

The correct-and-trivial fix is to run it by its full path.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS trunk because there has been no activity for 60 days.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS 2.0 because there has been no activity for 60 days.]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.