Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = 'hello';
- $password = 'hello';
- $node = 'my ip';
- exec('sudo -S ejabberd /usr/sbin/ejabberdctl register '.$username.' '.$node.' '.$password.' 2>&1',$output,$status);
- if($output == 0){
- // Success!
- echo 'success';
- }else{
- // Failure, $output has the details
- echo '<pre>';
- foreach($output as $o){
- echo $o."n";
- }
- echo '</pre>';
- }
- ?>
- sudo: /etc/sudoers.d is world writable
- [sudo] password for daemon:
- %admin ALL=(ALL) NOPASSWD: ALL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement