From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 10:20:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D15037B401 for ; Thu, 10 Apr 2003 10:20:54 -0700 (PDT) Received: from joloxbox.joshualokken.com (12-225-249-250.client.attbi.com [12.225.249.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C5C243F75 for ; Thu, 10 Apr 2003 10:20:53 -0700 (PDT) (envelope-from joshualokken@attbi.com) Received: from joloxbox.joshualokken.com (localhost.joshualokken.com [127.0.0.1])h3AHLabF029804; Thu, 10 Apr 2003 10:21:36 -0700 (PDT) (envelope-from joshualokken@attbi.com) Received: (from jolok@localhost) by joloxbox.joshualokken.com (8.12.9/8.12.9/Submit) id h3AHLX9w029803; Thu, 10 Apr 2003 10:21:33 -0700 (PDT) X-Authentication-Warning: joloxbox.joshualokken.com: jolok set sender to joshualokken@attbi.com using -f Date: Thu, 10 Apr 2003 10:21:33 -0700 From: Joshua Lokken To: "E. J. Cerejo" Message-ID: <20030410172133.GA29520@joloxbox.joshualokken.com> References: <1124.192.168.1.4.1049936589.squirrel@probsd.org> <3E94CF74.4030403@netscape.net> <1362.192.168.1.4.1049939943.squirrel@probsd.org> <3E95206D.9020807@netscape.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E95206D.9020807@netscape.net> User-Agent: Mutt/1.4i Organization: little to none X-OS: FreeBSD joloxbox.joshualokken.com 4.8-STABLE i386 cc: ms@probsd.org cc: freebsd-questions Subject: Re: sudo X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2003 17:20:54 -0000 * E. J. Cerejo (edinho64@netscape.net) wrote: ==> ==> ==> ms@probsd.org wrote: ==> >replace ecerejo.Belkin with: localhost ==> > ==> >then visudo ==> > ==> >what now? ==> > ==> >michael ==> > ==> > ==> > ==> >>ms@probsd.org wrote: ==> >> ==> >>>example - assuming your user name is noltie on a host named flowers ==> >>> ==> >>>ee /usr/local/etc/sudoers ==> >>> ==> >>>%noltie flowers:NOPASSWD: /usr/local/bin/cdrecord ==> >>> ==> >>>Then type: visudo ==> >>> ==> >>>To close and write the change, just do: Shift+:wq ==> >>> ==> >>>then as user noltie: sudo /usr/local/bin/cdrecord ==> >> ==> >>I get an error, this is the line I used: ==> >> ==> >>%kdedude ecerejo.Belkin:NOPASSWD: /usr/local/bin/cdrecord ==> >> ==> >>and I get this error when I try saving it with visudo: ==> >> ==> >>/usr/local/etc/sudoers.tmp: 28 lines, 637 characters. ==> >>>>> sudoers file: syntax error, line 27 <<< ==> >>What now? ==> ==> It doesn't give an error when saving if I put just this: ==> ==> %kdedude localhost = NOPASSWD: /usr/X11R6/bin/xcdroast ==> ==> but when I run it complains saying that kdedude is not in sudoers file, ==> tried it without the "%" sign and it complained again. The only way it ==> worked was when I put this in there: ==> ==> %wheel ALL=(ALL) NOPASSWD: ALL ==> ==> but I don't want to do that though, I just want to be able to run a few ==> commands and not "ALL" commands. ==> Why don't you try this: Cmnd_Alias ROAST = /usr/X11R6/bin/xcdroast ALL = NOPASSWD: ROAST That works for me. Also, you will want to check out this page: http://www.courtesan.com/sudo -- Joshua