Using celery in a django app to run script with root priviliges?

穿精又带淫゛_ 提交于 2019-12-11 10:43:51

问题


I need to run some commands on my ubuntu box where my django project resides that requires root privileges, from within my django project. I'm using celery to fire off an asynch process, this process in turn calls shell commands that requires root privileges to succeed.

How can I do this without risking creating huge security holes?

PS! The shell commands I need to call are smbpasswd, edit /etc/samba/smb.conf and restart the samba service.

来源:https://stackoverflow.com/questions/3767841/using-celery-in-a-django-app-to-run-script-with-root-priviliges

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!