On Sun, Mar 04, 2007 at 02:18:41PM -0600, Dan Farrell wrote > FWIW, it was kind of a PITA to set up dialup in a secure way for > multiple users to use with traditional UNIX permissioning.
I'm the only person on my machine, but things get complicated because the dialup is emergency backup for my ADSL connection. I can't get the two connections to co-exist peacefully. Furthermore, I use different ISPs for broadband and dialup, because problems at an ISP might take down both broadband and dialup access. That means that I have to copy over a different /etc/ssmtp/ssmtp.conf. So my ~/bin/dialup script is... #!/bin/bash /usr/bin/sudo /sbin/ifconfig eth0 down /usr/bin/sudo /usr/bin/cp -f /etc/ssmtp/295.ssmtp.conf /etc/ssmtp/ssmtp.conf /usr/bin/sudo /usr/sbin/pon 295caext The 3 commands... 1) tear down eth0 2) copy in the appropriate ssmtp.conf for my dialup ISP 3) run pon to actually dialup My ~/bin/dialdown (hang up dialup, and restore ADSL) script is #!/bin/bash /usr/bin/sudo /usr/sbin/poff /usr/bin/sudo /usr/bin/cp -f /etc/ssmtp/istop.ssmtp.conf /etc/ssmtp/ssmtp.conf /usr/bin/sudo /etc/init.d/net.eth0 restart 1) hang up the dialup connection 2) copy in the appropriate ssmtp.conf for my ADSL ISP 3) bring up eth0 To enable doing this without passwords, my /etc/sudoers contains... waltdnes m3000 = (root) NOPASSWD: /sbin/ifconfig eth0 down waltdnes m3000 = (root) NOPASSWD: /usr/bin/cp -f /etc/ssmtp/295.ssmtp.conf /etc/ssmtp/ssmtp.conf waltdnes m3000 = (root) NOPASSWD: /usr/sbin/pon 295caext waltdnes m3000 = (root) NOPASSWD: /usr/sbin/poff waltdnes m3000 = (root) NOPASSWD: /usr/bin/cp -f /etc/ssmtp/istop.ssmtp.conf /etc/ssmtp/ssmtp.conf waltdnes m3000 = (root) NOPASSWD: /etc/init.d/net.eth0 restart -- Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1 -- gentoo-user@gentoo.org mailing list