public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Rooted/compromised Gentoo, seeking advice
Date: Tue, 10 Aug 2010 21:16:20 -0500	[thread overview]
Message-ID: <4C6207F4.7020008@gmail.com> (raw)
In-Reply-To: <20100811010545.GB15953@waltdnes.org>

Walter Dnes wrote:
> On Tue, Aug 10, 2010 at 04:14:41AM +0200, Frank Steinmetzger wrote
>    
>> Am Dienstag, 10. August 2010 schrieb Paul Hartman:
>>
>>      
>>> Typing that long password into sudo every time I ran a command was a
>>> hassle
>>>        
>> I???ve never used sudo, and never really liked the idea of it. In
>> fact I???m always amused and slightly annoyed by the sheer amount
>> of sudo one can find in your typical ubuntu howto. ;-)
>>      
>    There are some things that have to be done as root, but are needed by
> a regular user.  E.g. I have a backup dialup account with 295.ca (guess
> how much they charge per month<G>).  When using it, I not only have to
> run "pon", but I also have to copy over the correct ssmtp.conf settings
> for my dialup ISP.  My ~/bin/udialup (USB dialup) script reads like so...
>
> #!/bin/bash
> /usr/bin/sudo /bin/cp -f /etc/ssmtp/295.ssmtp.conf /etc/ssmtp/ssmtp.conf
> /usr/bin/sudo /usr/sbin/pon u295.ca
>
>    When I exit, I have to copy back the ssmtp.conf that points to my
> broadband ISP's MTU.  My ~/bin/dialdown script reads like so...
>
> #!/bin/bash
> /usr/bin/sudo /usr/sbin/poff
> /usr/bin/sudo /bin/cp -f /etc/ssmtp/teksavvy.ssmtp.conf /etc/ssmtp/ssmtp.conf
>
>    This is after I figured out how to use "metric" in my network config
> so that ppp0 and eth0 could co-exist side by side.  ppp0 can talk to the
> outside world via the dialup modem, while eth0 *SIMULTANEOUSLY* talks to
> my other machines on 192.168.123.248/29 (aka 192.168.123.240 netmask
> 255.255.255.240).  Before that, my udialup script had to tear down eth0,
> and dialdown had to restart it.  Here are some of the entries in
> /etc/sudoers on my machine "i3"...
>
> waltdnes    i3 = (root) NOPASSWD: /bin/cp -f /etc/ssmtp/295.ssmtp.conf /etc/ssmtp/ssmtp.conf
> waltdnes    i3 = (root) NOPASSWD: /usr/sbin/pon 295.ca
> waltdnes    i3 = (root) NOPASSWD: /usr/sbin/poff
> waltdnes    i3 = (root) NOPASSWD: /bin/cp -f /etc/ssmtp/teksavvy.ssmtp.conf /etc/ssmtp/ssmtp.conf
> waltdnes    i3 = (root) NOPASSWD: /sbin/poweroff
> waltdnes    i3 = (root) NOPASSWD: /usr/bin/rdate time.nrc.ca -s
> waltdnes    i3 = (root) NOPASSWD: /sbin/hwclock --systohc
> waltdnes    i3 = (root) NOPASSWD: /usr/sbin/hibernate
>
>    This gives me the power to do specific root-level stuff as a regular
> user, without giving away the keys to the kingdom.  Note that none of
> the entries accepts any parameters, let alone $*.  Also. specifying the
> path prevents running the wrong executable with root-level privileges.
>
>    


I used to use wvdial as well as pon and I don't recall having to be 
root.  I added myself the dial-up group if I recall correctly.  It just 
worked for me.

I also don't use sudo here either.  ;-)

Dale

:-)  :-)



  reply	other threads:[~2010-08-11  3:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09 16:25 [gentoo-user] Rooted/compromised Gentoo, seeking advice Paul Hartman
2010-08-09 16:48 ` Alan McKinnon
2010-08-09 18:48   ` Paul Hartman
2010-08-09 18:59 ` [gentoo-user] " 7v5w7go9ub0o
2010-08-09 19:08   ` Paul Hartman
2010-08-09 19:46   ` Mick
2010-08-10 13:50     ` Kyle Bader
2010-08-09 19:09 ` [gentoo-user] " Mick
2010-08-09 20:08   ` Robert Bridge
2010-08-09 20:20     ` Bill Longman
2010-08-10  0:30       ` Kevin O'Gorman
2010-08-10  1:18         ` William Hubbs
2010-08-10  6:42           ` Alan McKinnon
2010-08-10 13:03           ` Kevin O'Gorman
2010-08-10 18:50             ` Alan McKinnon
2010-08-10 19:22               ` Hazen Valliant-Saunders
2010-08-10 23:23                 ` Peter Humphrey
2010-08-11 16:55                 ` Stroller
2010-08-11 18:16                   ` Dale
2010-08-11 20:30                     ` Alan McKinnon
2010-08-11 22:11                       ` [gentoo-user] Rooted/compromised Gentoo, seeking advice - AKA passwords Bill Longman
2010-08-11 23:09                         ` Alan McKinnon
2010-08-12  4:30                           ` Bill Longman
2010-08-12 13:01                       ` [gentoo-user] Rooted/compromised Gentoo, seeking advice Stroller
2010-08-12 19:21                         ` Alan McKinnon
2010-08-12 19:43                           ` Peter Humphrey
2010-08-12 20:14                             ` Alan McKinnon
2010-08-12 12:56                     ` Stroller
2010-08-13  2:11                       ` Dale
2010-08-11 16:58               ` Stroller
2010-08-11 20:26                 ` Alan McKinnon
2010-08-09 20:25     ` Dale
2010-08-09 21:22       ` Mick
2010-08-09 22:19         ` Dale
2010-08-09 21:17     ` Philip Webb
2010-08-09 23:07   ` Paul Hartman
2010-08-10  2:14     ` Frank Steinmetzger
2010-08-10  2:24       ` Indexer
2010-08-11  1:05       ` Walter Dnes
2010-08-11  2:16         ` Dale [this message]
2010-08-11  4:36           ` Walter Dnes
2010-08-11  5:37             ` Dale
2010-08-10  2:30     ` Keith Dart
2010-08-10  3:06 ` Adam Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6207F4.7020008@gmail.com \
    --to=rdalek1967@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox