If I use the following python command to save the file:
- os.system('sudo -S echo "test text" | sudo tee /etc/issue.net')
I get the following error in the apache log:
sudo: a terminal is required to read the password; either use the -S option
to read from standard input or configure an askpass helper
[sudo] password for www-data:
sudo: no password was provided
Thanks!
El vie, 30 de abr. de 2021 a la(s) 11:30, Edwin Rueda ([email protected])
escribió:
> Hi Graham and everyone,
>
> I have a problem with a current task I'm doing in AWS. I'm creating a web
> interface to set permissions and change the ssh welcome message. The
> problem is that when saving the welcome message, I have to modify the /etc/
> issue.net file with the following python line:
>
> open("/etc/issue.net").write("test text")
>
> the problem is that the server won't let me save because I don't have
> superuser permissions.
>
> the alert that appears in the apache log is as follows:
> - sudo: a terminal is required to read the password; either use the
> -S option to read from standard input or configure an askpass helper
>
> note that in AWS, by default there is no superuser key
>
> Finally, this is my .conf file:
>
> WSGIDaemonProcess flaskproject threads=5
> WSGIScriptAlias / /var/www/html/flaskproject/app.wsgi
>
> <Directory flaskproject>
> WSGIProcessGroup flaskproject
> WSGIApplicationGroup %{GLOBAL}
> Order deny,allow
> Allow from all
> </Directory>
>
> can you help me ?
>
> Thabks!!!!
> --
> *Edwin J. Rueda*
> Maestrando en Ciencias de la Computación
> Universidade Federal do Pará, Brasil
> Ingeniero de Sistemas
> Universidad Industrial de Santander, Colombia
>
--
*Edwin J. Rueda*
Maestrando en Ciencias de la Computación
Universidade Federal do Pará, Brasil
Ingeniero de Sistemas
Universidad Industrial de Santander, Colombia
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/modwsgi/CAJ83xwrY9py2qpHBov%2B-bXAFtE1-pvsBpRK96YXvML_KmTq3sQ%40mail.gmail.com.