[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Making root run fetchmail as a user?



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.



Reply to: