(another) way to Startmol as non-root (by another Phil)


Subject: (another) way to Startmol as non-root (by another Phil)
From: philippe tapon (philippe@ufoh.com)
Date: Wed Nov 22 2000 - 18:44:57 MST


Philip Good wrote:
>
> Here's a simple way to start MOL as non-root: use sudo. sudo allows you to
> execute commands as root sithout having to change to root via su.
>
> Setup sudo: (as root) by
>
> visudo
>
> edit this file. Here's some lines from mine:
>
> Cmnd_Alias STARTMOL = /usr/bin/startmol
> Cmnd_Alias MIRROR = /usr/bin/mirror
> Cmnd_Alias VISUDO = /usr/sbin/visudo
> Cmnd_Alias KILL = /usr/bin/kill
>
> root ALL=(ALL) ALL
> me ALL = NOPASSWD: KILL, STARTMOL, MIRROR
> me ALL = REBOOT, VISUDO
>
> Now, I just type "sudo STARTMOL" to start MOL.
> To reboot or use visudo I'll need too use my password.
>
> This won't allow you too put this as an applet on your menu bar but its
> pretty easy.
>
> Phil

After some experimentation I found that (in my case) placing
these four lines

echo "starting mol's sheep_net module. . . ."
/sbin/insmod /usr/lib/mol/modules/sheep_net.o
echo "starting mol module. . . ."
/sbin/insmod /usr/lib/mol/modules/mol.o

at the end of /etc/rc.d/rc.local starts the part of mol that needs root
authority at the boot. That way any user can run mol after the boot,
even resuming an mol
saved session (though there may be hiccups, like a
file-services-got-interrupted message.) The applet has a startmol
command.

I haven't checked the wisdom of loading the modules like this with the
creators of MOL but it appears to work well so far (famous last words).

On the other hand, I didn't know about the sudo command and had been
wondering how something like that would work.

pax

philippe



This archive was generated by hypermail 2a24 : Tue Nov 21 2000 - 20:28:55 MST