ubuntu user doesn't have password-less sudo on centos7

Bug #1949626 reported by james beedy
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Undecided
Unassigned

Bug Description

The ubuntu user doesn't seem to have password-less sudo on centos7 deployed on a localhost/lxd cloud.

This was reported by one of our developers, I just verified on a fresh controller.

The centos7 image was provisioned following the documentation https://omnivector-solutions.github.io/osd-documentation/master/installation.html#centos7-deploys-on-lxd-clouds

$ juju add-machine --series centos7

$ juju status 1
Model Controller Cloud/Region Version SLA Timestamp
default localhost-localhost localhost/localhost 2.9.17 unsupported 17:38:20Z

Machine State DNS Inst id Series AZ Message
1 started 10.20.96.86 juju-d2c8b5-1 centos7 Running

$ juju ssh 1
Last login: Wed Nov 3 17:38:04 2021 from _gateway.lxd
[ubuntu@juju-d2c8b5-1 ~]$ sudo -s

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for ubuntu:

Revision history for this message
james beedy (jamesbeedy) wrote :

I just verified that the ubuntu user does have passwordless sudo on centos7 deployed via MAAS. It seems this issue only exists for lxd deploys as far as I can tell.

Revision history for this message
Simon Richardson (simonrichardson) wrote :

We could add the user to /etc/sudoers with NOPASSWD when running the userdatacfg.

Changed in juju:
status: New → Triaged
Revision history for this message
james beedy (jamesbeedy) wrote :

@simonrichardson - I hadn't been back around to this bug until just now. This is great! How can we do this?

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.