Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor change to the user setup logic

  • Loading branch information...
commit 66a5f84db078a878ffebaf17b2073d2524091c12 1 parent 08ae4a6
@bretth authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 woven/linux.py
View
22 woven/linux.py
@@ -144,17 +144,17 @@ def enter_password():
#Add existing user to sudo group
else:
sudo('adduser %s sudo'% sudo_user)
- #adm group used by Ubuntu logs
- sudo('usermod -a -G adm %s'% sudo_user)
- #add user to /etc/sudoers
- if not exists('/etc/sudoers.wovenbak',use_sudo=True):
- sudo('cp -f /etc/sudoers /etc/sudoers.wovenbak')
- sudo('cp -f /etc/sudoers /tmp/sudoers.tmp')
- append("# Members of the sudo group may gain root privileges", '/tmp/sudoers.tmp', use_sudo=True)
- append("%sudo ALL=(ALL) ALL", '/tmp/sudoers.tmp', use_sudo=True)
- sudo('visudo -c -f /tmp/sudoers.tmp')
- sudo('cp -f /tmp/sudoers.tmp /etc/sudoers')
- sudo('rm -rf /tmp/sudoers.tmp')
+ #adm group used by Ubuntu logs
+ sudo('usermod -a -G adm %s'% sudo_user)
+ #add user to /etc/sudoers
+ if not exists('/etc/sudoers.wovenbak',use_sudo=True):
+ sudo('cp -f /etc/sudoers /etc/sudoers.wovenbak')
+ sudo('cp -f /etc/sudoers /tmp/sudoers.tmp')
+ append("# Members of the sudo group may gain root privileges", '/tmp/sudoers.tmp', use_sudo=True)
+ append("%sudo ALL=(ALL) ALL", '/tmp/sudoers.tmp', use_sudo=True)
+ sudo('visudo -c -f /tmp/sudoers.tmp')
+ sudo('cp -f /tmp/sudoers.tmp /etc/sudoers')
+ sudo('rm -rf /tmp/sudoers.tmp')
env.password = original_password
Please sign in to comment.
Something went wrong with that request. Please try again.