superuser

Run a linux system command as a superuser, using a python script

I have got postfix installed on my machine and I am updating virtual_alias on the fly programmatically(using python)(on some action). Once I update the entry in the /etc/postfix/virtual_alias, I am running the command:sudo /usr/sbin/postmap /etc/postfix/virtual_alias 2>>/work/postfix_valias_errorfileBut I am getting the error:sudo: sorry...

Require the user to enter the server's superuser/root password in PHP.

Hi all! I'm making a system called NCIV in PHP. In that system you can change a setting in settings.php, which allows the system's admin to enable or disable the usage of MySQL rather then a bunch of text files. However, changing that setting if the site already has content, will move all the data from/to the MySQL Database to/from the ...

Upgrading mysql from 4.1.22 to 5.0

Hi, I'm trying to upgrade our company's 4.1.22 version of MySQL to 5. I'm using sudo yum --enablerepo=centosplus upgrade mysql* but keep getting an error of conflicted files with the 4.1 version. Does that mean there really isn't any other way than uninstalling 4.1 and installing 5.0? I have read that using the yum upgrade command...

How to make *.py files have the python icon in Win7?

Hi! Installed the IronPython tools for VS 2010 but it didn't associate the *.py files to VS, neither did it (obviously) change the *.py files' icon. How do I do that in Windows 7? ...

Give up root privilegies?

I have a program which runs a bunch of tasks as root at launch. After that it needs to drop to a different user. How can that be done? And just wondering, is it possible to reacquire root without relaunching the program? ...

Writing android app that executes linux commands

I have an compiled executable that is supposed to copy itself from the res folder, and into the /data/data/package-name/ folder, and change the permissions, and then execute. Every step completes all the way to the end. The output stream seems to be writing, etc. Except when I go check the file system, nothing has been done. I first trie...

How to show that a script should be run as root in Linux

I am writing technical documentation for a smalll project I wrote in college. How do I show that script should be run with root privileges? My main question is what is the norm of depicting show a scenario? I can of course write that 'run the script with root privileges', but I thought I had ask here. Should I do : Run the script with...