mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 17:52:17 +03:00
added method to disabled local users after registration ahenk
This commit is contained in:
parent
b4eb4fe033
commit
d914422320
1 changed files with 2 additions and 1 deletions
|
@ -191,6 +191,7 @@ class Registration:
|
||||||
result_code, p_out, p_err = self.util.execute(command_users)
|
result_code, p_out, p_err = self.util.execute(command_users)
|
||||||
lines = p_out.split('\n')
|
lines = p_out.split('\n')
|
||||||
lines.pop()
|
lines.pop()
|
||||||
|
self.logger.debug("will be disabled: "+str(lines))
|
||||||
for line in lines:
|
for line in lines:
|
||||||
detail = line.split(':')
|
detail = line.split(':')
|
||||||
if detail[0] != 'root':
|
if detail[0] != 'root':
|
||||||
|
@ -198,4 +199,4 @@ class Registration:
|
||||||
self.util.execute(command_logout_user.format(detail[0]))
|
self.util.execute(command_logout_user.format(detail[0]))
|
||||||
self.logger.debug('{0} has been disabled and killed all processes for {0}'.format(detail[0]))
|
self.logger.debug('{0} has been disabled and killed all processes for {0}'.format(detail[0]))
|
||||||
else:
|
else:
|
||||||
self.logger.info("machine has only root user")
|
self.logger.info("Ahenk has only root user")
|
||||||
|
|
Loading…
Reference in a new issue