[Bug 1584549] [NEW] sudoers not honoring hostnames

oshunluvr stuartksmith at gmail.com
Sun May 22 23:31:34 UTC 2016


Public bug reported:

New Kubuntu 16.04 install, adding features from previous 15.04 install.
Added exact copy of /etc/sudoers.d/apt from 15.04 to 16.04 but it does
not work as expected. File contents:

myusername myhostname = NOPASSWD: /usr/bin/apt, /usr/bin/apt-get,
/usr/bin/add-apt-repository

results in 15.04 in user "myusername" being able to run apt, apt-get,
and add-apt-repository from the CLI using sudo without a password
prompt. However, same exact syntax in 16.04 results in password prompt.

In the 16.04 install, changing "myhostname" to "ALL" resumes the no
password behavior. Both installs have exact same /etc/hosts files,
running on bare metal on the same system, and the "hostname" command
results in the same reply with the correct hostname. I have compared the
subject files several times and there are no differences. No errors
editing any of the files using visudo. Permissions and syntax same on
both systems.

This leads me to conclude sudoers is not honoring the hostname in the
sudoers file(s).

** Affects: hostname (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to hostname in Ubuntu.
https://bugs.launchpad.net/bugs/1584549

Title:
  sudoers not honoring hostnames

Status in hostname package in Ubuntu:
  New

Bug description:
  New Kubuntu 16.04 install, adding features from previous 15.04
  install. Added exact copy of /etc/sudoers.d/apt from 15.04 to 16.04
  but it does not work as expected. File contents:

  myusername myhostname = NOPASSWD: /usr/bin/apt, /usr/bin/apt-get,
  /usr/bin/add-apt-repository

  results in 15.04 in user "myusername" being able to run apt, apt-get,
  and add-apt-repository from the CLI using sudo without a password
  prompt. However, same exact syntax in 16.04 results in password
  prompt.

  In the 16.04 install, changing "myhostname" to "ALL" resumes the no
  password behavior. Both installs have exact same /etc/hosts files,
  running on bare metal on the same system, and the "hostname" command
  results in the same reply with the correct hostname. I have compared
  the subject files several times and there are no differences. No
  errors editing any of the files using visudo. Permissions and syntax
  same on both systems.

  This leads me to conclude sudoers is not honoring the hostname in the
  sudoers file(s).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hostname/+bug/1584549/+subscriptions



More information about the foundations-bugs mailing list