Re: ownership and permissions
David Stern hat gesagt: // David Stern wrote:
> Hi,
>
> If root initiates pon (pppd is owned by root, group dip), how can I
> setup /etc/ppp/ip-up so that it runs /home/user/.checkformail as user
> (not root)?
> I know several ways root can get the job without being user, `here'
> `there' in fetchmailrc is one, and I know I can change permissions on
> pppd to run pon as user, though I've never been able to get that to
> work, but I'd like it to run as user regardless of who initiates pon.
> I didn't find much in man su.
I have in my /etc/ppp/ip-up (which gets started after the ppp-link is
established):
# See what's going on:
echo "Getting Mail for User freak..." > /dev/xconsole
# Getting Mail for freak:
su --login freak --command "/usr/bin/fetchmail --daemon 500 --all"
You could do something like
su - username -c "/home/username/.checkformail"
as well.
>
> Speaking of su, I have a root window (rxvt -e su --) in a user X-window
> session, and I seem to not be able to run X apps from the root window
> due to the DISPLAY env variable, but it is identical to user's (0:0),
> and running xhost complains about an invalid magic cookie, unable to
> open display. What do I need to do to get X apps to run from a root
> window in a user's X-window session?
DON'T USE "xhost +"!
You can get things right with xauth, but I would recommend
you install ssh form non-us (or non-free?).
Then you can start a terminal like:
$ rxvt -title root@localhost -e ssh -l root localhost
^ optional ^shell ^login ^where
and you have no more problems with DISPLAY, xauth etc.
>
> This is my first (non-test) message from exmh, so I hope it looks ok.
Looks wonderful!
--
Yours <a href="http://www.koeln-online.de/einblick/">
Frank Barknecht Das Koelner Stadt- und Unimagazin
>-------------< </a>
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: