Why don't you try: su user -c "cd ~ && fetchmail --any-options-come-here"
in your scripts? --Marcus On Mon, Mar 26, 2001 at 10:45:44PM +1000, Mark Devin wrote: > I would like to make fetchmail run as a user rather than root when run > via my /etc/ppp/ip-up.d/fetchmail-up script > > Here is what I tried to do to get fetchmail to run as user "mail": > > Make a home directory for user mail - /home/mail > set the owner and group for this directory to "mail" > chown mail /usr/bin/fetchmail chgrp mail /usr/bin/fetchmail > chmod 4755 /usr/bin/fetchmail > This makes the binary run as user mail despite who calls it (including > root) > create a .fetchmailrc file in the home directory of user "mail" > Edit the /etc/ppp/ip-up.d/fetchmail-up script > Edit the /etc/ppp/ip-down.d/fetchmail-down script > > This didn't work. > I also tried calling fetchmail with the --fetchmailrc and --idfile > options set appropriately. And this didn't work either. > > I wanted to do it this way 'cause I thought it would be more secure - ie > less things running as root the better. But I guess its not possible to > be cracked via fetchmail since it doesn't accept connections, it makes > them itself. > > Any ideas 'cause it would be useful to know how to do it anyway. > > Regards. > > Mark. > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- [EMAIL PROTECTED] http://www.antbear.org