Mam polecenie service app start-demo
wymaga ode mnie wpisać sudo service app start-demo
w linii poleceń.Wykonaj jako sudo w tkaninie
użyłem sudo(service app start-demo)
i sudo(sudo service app start-demo)
ale wciąż
Warning: sudo() wystąpił błąd (kod zwrotny 1) podczas wykonywania 'aplikacja usługa sudo uruchomienie demo'
nie mam problemu wykonującemu że jako wiersz poleceń w terminalu.
Nie jestem pewien, czy SADeprecationWarning:
liczy się jako uszkodzenie tkaniny?
Dzięki.
[email protected]:/var/lib/app$ fab kickstart
You are installing prereqs..........
### Install Prereqs for Populate ###
No hosts found. Please specify (single) host string for connection: localhost
[localhost] Login password:
### I am starting demo ###
[localhost] sudo: sudo service app start-demo
[localhost] out: Starting demo
Fatal error: sudo() encountered an error (return code 1) while executing 'sudo service app start-demo'
Aborting.
Disconnecting from localhost... done.
kod
def pserve():
print '### I am starting demo ###'
#with settings(warn_only=True):
sudo('sudo service app start-demo')
#sudo('service app start-demo')
albo komenda sudo
zawiedzie.
/etc/sudoers
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD:ALL
Czy konfiguracja 'sudo' wymaga podania hasła na terminalu? – sarnold
Czy umieściłeś polecenie w cudzysłowie? Powinien to być 'sudo (" start-demo aplikacji serwisowej ")'. – mayhewr
@sarnold To nie działa. Kiedy robię "sudo" na terminalu, nie pytam. Biegłem jako fab, którego też nie pytałem. – user423455