OrganizedChaos
MIS
Hi All,
I am running Scalix email server and I am looking for a way to build a web interface to add and remove users (this would be much like the way one would add and remove linux users).
I have set the apache user to have rights to run the program in the /etc/sudoers file.
While apache came with /sbin/nologin in the /etc/passwd file, I changed that to test to /bin/bash and I was able to add / remove users with the command "sudo omaddu"
omaddu = add users in scalix system
My web page script looks like this
That calls this file
test
If I run the test script from the apache temp login it runs fine.
I have looked at the /var/log/http/error.log and it looks like the file is requesting a password as the last line just says Password:
I have no password for these command set in the sudoers file and like I mentioned, it works from bash?
Any ideas?
I am running Scalix email server and I am looking for a way to build a web interface to add and remove users (this would be much like the way one would add and remove linux users).
I have set the apache user to have rights to run the program in the /etc/sudoers file.
While apache came with /sbin/nologin in the /etc/passwd file, I changed that to test to /bin/bash and I was able to add / remove users with the command "sudo omaddu"
omaddu = add users in scalix system
My web page script looks like this
Code:
<?
$output=`/var/[URL unfurl="true"]www/html/test`;[/URL]
echo "<pre>$output</pre>"
?>
That calls this file
test
Code:
#!/bin/bash
sudo omaddu -n test/mail -p pass
If I run the test script from the apache temp login it runs fine.
I have looked at the /var/log/http/error.log and it looks like the file is requesting a password as the last line just says Password:
I have no password for these command set in the sudoers file and like I mentioned, it works from bash?
Any ideas?