I need to run some commands in my ubuntu box where my django project, which requires root privileges, from my django project is located. I use celery to run an asynchronous process, this process, in turn, invokes shell commands that require root privileges to succeed.
How can I do this without risking creating huge security holes?
PS! The shell commands that I need to call are smbpasswd, edit /etc/samba/smb.conf and restart the samba service.
source share