fix group stuff

add-key-for-user
nate 2017-12-13 23:43:58 -08:00
parent 09f61e8ccc
commit 24e87bb09f
1 changed files with 6 additions and 1 deletions

View File

@ -90,12 +90,17 @@ class Townie(User):
_guarded_run(['sudo', _guarded_run(['sudo',
'adduser', 'adduser',
'--quiet', '--quiet',
'--groups=town',
'--shell={}'.format(self.shell), '--shell={}'.format(self.shell),
'--gecos="{}"'.format(self.displayname), '--gecos="{}"'.format(self.displayname),
'--disabled-password', '--disabled-password',
self.username,]) self.username,])
_guarded_run(['sudo',
'usermod',
'-a',
'-Gtown',
self.username])
# Create .ssh # Create .ssh
_guarded_run(['sudo', _guarded_run(['sudo',
'--user={}'.format(self.username), '--user={}'.format(self.username),