Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what user is used to call an external script ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Thu Oct 11, 2012 1:43 pm    Post subject: what user is used to call an external script ? Reply with quote

I am currently running dovecot, and have written a service /etc/init.d/getmail that .... gets mail :-) at regular intervals.
I wanted to use a plugin fetchmail-wakeup https://github.com/marschap/fetchmail_wakeup and use it to call the script when a client logs in. In the plugin configuration, I write
fetchmail_helper = /etc/init.d/getmail restart

Now this doesn't work because the service can only be started by root, and obviously the plugin does not call the script as root. I wanted now to use sudo for the call, but then I need to know the userid or group that does the calling.

I tried to write a small script "whoami > /tmp/output", gave it +x rights and changed the plugin to
fetchmail_helper = /my-whoami-script

I also get nothing from this, probably because the script runs as something like nobody and is not even allowed to write to tmp.

What could I do to try and get info on the userid that this plugin uses ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum