Bug 1384679 - Fedora Cloud Base Vagrant Boxes Don't Allow Vagrant User To su To Other Users
Summary: Fedora Cloud Base Vagrant Boxes Don't Allow Vagrant User To su To Other Users
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 20:39 UTC by Steve Kuznetsov
Modified: 2016-10-14 07:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-14 07:53:29 UTC
Type: Bug


Attachments (Terms of Use)

Description Steve Kuznetsov 2016-10-13 20:39:42 UTC
Description of problem:
When attempting to switch to another user, `sudo su <user>` where `<user>` is not `root` in the Vagant Fedora Cloud Base boxes does not work. This is as the contents of /etc/sudoers.d/vagrant-nopasswd are incorrect.

Version-Release number of selected component (if applicable):
Fedora-Cloud-Base-Vagrant-24-1.2.x86_64.vagrant-libvirt.box

Steps to Reproduce:
$ vagrant box add https://download.fedoraproject.org/pub/fedora/linux/releases/24/CloudImages/x86_64/images/Fedora-Cloud-Base-Vagrant-24-1.2.x86_64.vagrant-libvirt.box --name fedora/cloud-base
$ vagrant init fedora/cloud-base
$ vagrant up --provider=libvirt
$ vagrant ssh --command 'sudo useradd testuser'
$ vagrant ssh --command 'sudo --user testuser pwd'

Actual results:
Password prompt to switch users or permission denied message.

Expected results:
Successful user switch.

Additional info:
Just need to make the following patch:

diff --git a/vagrant-nopasswd b/vagrant-nopasswd
index 6b59f02..f892bc1 100644
--- a/vagrant-nopasswd
+++ b/vagrant-nopasswd
@@ -1 +1 @@
-vagrant ALL=NOPASSWD: ALL
+vagrant ALL=(ALL) NOPASSWD: ALL

Comment 1 Vít Ondruch 2016-10-14 07:51:44 UTC
Hi Steve,

Unfortunately this not the right place for such error. This is just to report issues with the package, not with the boxes. Atomic WG tracker [1] should be the right place if I am not mistaken.


[1] https://pagure.io/atomic-wg


Note You need to log in before you can comment on or make changes to this bug.