bug fix: change ssh password for ubuntu

This commit is contained in:
Usman Nasir
2019-11-19 00:06:35 +05:00
parent 403449e150
commit d176935fb7

View File

@@ -2474,7 +2474,13 @@ StrictHostKeyChecking no
website = Websites.objects.get(domain=self.domain)
uBuntuPath = '/etc/lsb-release'
if os.path.exists(uBuntuPath):
command = "echo '%s:%s' | chpasswd" % (data['externalApp'], data['password'])
else:
command = 'echo "%s" | passwd --stdin %s' % (data['password'], data['externalApp'])
ProcessUtilities.executioner(command)
data_ret = {'status': 1, 'error_message': 'None'}