Answer the question
In order to leave comments, you need to log in
How to make ssh2 script work?
PHP
script not executing :
$output = $ssh2Lib->execute($link, "/home/cp/gameservers.py install $server[server_id] $server[game_code] $server[location_ip] $server[server_port] $server[server_slots] $server[server_password]");
def serverInstall():
os.system('useradd -m -g gameservers -p ' + crypt.crypt(password, salt) + ' ' + username)
returnResult('ERROR', 'useradd -m -g gameservers -p ' + crypt.crypt(password, salt) + ' ' + username)
for archive in gameConfig['Archives']:
os.system('tar -xf /home/cp/gameservers/files/' + archive + '.tar -C /home/' + username + '/')
os.system('chown ' + username + ' -Rf /home/' + username)
os.system('chmod 700 /home/' + username)
return True
/home/cp/gameservers.py start 14 crmb **.***.****.** 5022 40 pass
from the putty console, then useradd is executed. Answer the question
In order to leave comments, you need to log in
Most likely the problem is that it is not executed from the root user: 3
After all, from putty you come in as root
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question