summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov1@gmail.com>2017-07-21 13:13:20 +0100
committerRadostin Stoyanov <rstoyanov1@gmail.com>2017-07-21 13:35:48 +0100
commit8028e1054a596077fe7b15d4c254c5d37289ebd6 (patch)
tree58f89f1db48bdaaa4e0d496154c5624cf59a6f5f /setup.py
parent2762d815643754bc4f5b4a922989fc1acf5ea5b6 (diff)
downloadvirt-bootstrap.git-8028e1054a596077fe7b15d4c254c5d37289ebd6.tar.gz
virt-bootstrap.git-8028e1054a596077fe7b15d4c254c5d37289ebd6.tar.xz
virt-bootstrap.git-8028e1054a596077fe7b15d4c254c5d37289ebd6.zip
Drop need of root privileges to set root password
These changes aim to avoid the requirement for root privileges when setting the password of root user on root file system. The "-R, --root" flag of chpasswd is using chroot to apply changes in root file system and this requires root privileges. [1] Instead compute hash of the root password using passlib [2] and insert the value in the /etc/shadow file in the rootfs. [1] https://en.wikipedia.org/wiki/Chroot#Limitations [2] http://passlib.readthedocs.io/en/stable/lib/passlib.hosts.html
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 70e3e03..36de2d5 100755
--- a/setup.py
+++ b/setup.py
@@ -112,6 +112,11 @@ setup(
cmdclass={
'pylint': CheckPylint
},
+
+ # virt-bootstrap uses passlib to compute the hash of
+ # root password for root file system.
+ install_requires=['passlib>=1.6.1'],
+
extras_require={
'dev': [
'pylint',