Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD: Root password not set! #610

Closed
rickard-von-essen opened this issue Jun 13, 2016 · 3 comments
Closed

FreeBSD: Root password not set! #610

rickard-von-essen opened this issue Jun 13, 2016 · 3 comments
Assignees
Labels
Type: Bug Does not work as expected.

Comments

@rickard-von-essen
Copy link
Collaborator

The FreeBSD 9.3 and 10.3 boxes don't have any root password set allowing any user to become root with su without a password.

This is because the install scripts (9.3 and 10) are missing -h 0.
E.g.
echo "vagrant" | pw -V /mnt/zroot/etc usermod root
should be
echo "vagrant" | pw -V /mnt/zroot/etc usermod root -h 0

But fixing this causes the script execution to fail since no root password is given.

      "execute_command": "{{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
@rickard-von-essen
Copy link
Collaborator Author

One solution would be to install sudo in the install script and use sudo in the shell provisioner. Another would be to allow root to ssh and use

  "ssh_username": "root",

@cheeseplus
Copy link
Contributor

Fantastic catch - I seem to recall us trying to avoid sudo on FreeBSD as it's not strictly required for the platform but it's probably sensible for these boxes.

@rickard-von-essen
Copy link
Collaborator Author

We install it anyway in scripts/freebsd/sudoers.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

4 participants