From owner-freebsd-isp Wed Nov 13 20:51:55 2002 Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03ECB37B401 for ; Wed, 13 Nov 2002 20:51:54 -0800 (PST) Received: from mail.lambertfam.org (www.lambertfam.org [216.223.196.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7810A43E3B for ; Wed, 13 Nov 2002 20:51:53 -0800 (PST) (envelope-from lambert@lambertfam.org) Received: from laptop.lambertfam.org (unknown [10.1.0.2]) by mail.lambertfam.org (Postfix) with ESMTP id 89890351C8 for ; Wed, 13 Nov 2002 23:51:41 -0500 (EST) Received: by laptop.lambertfam.org (Postfix, from userid 1000) id 835CD28B0E; Wed, 13 Nov 2002 23:51:40 -0500 (EST) Date: Wed, 13 Nov 2002 23:51:40 -0500 From: Scott Lambert To: freebsd-isp@FreeBSD.ORG Subject: Re: su and root password Message-ID: <20021114045140.GB82569@laptop.lambertfam.org> Mail-Followup-To: freebsd-isp@FreeBSD.ORG References: <002701c28b94$c378f4e0$a977ca41@yogi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002701c28b94$c378f4e0$a977ca41@yogi> User-Agent: Mutt/1.4i Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Nov 13, 2002 at 10:17:36PM -0600, Lewis Watson wrote: > I have a program that ssh's to my machine and needs to do a script that > calls pw useradd. I do not want to give root ssh ability so how can I make a > regular user ssh in and utilize pw useradd as root? I have the script and it > works great as root... I just can't figure out how to get around the > password prompt for su.... > Please pass me some suggestions. > Thanks. First, if you haven't already: Add a dedicated user that is only used for this purpose and is only allowed to ssh in from the, hopefully, one management machine. cd /usr/ports/security/sudo make install read the documentation and configure it sudo such that this one user is allowed to "sudo pw adduser " as root without being asked a password. -- Scott Lambert KC5MLE Unix SysAdmin lambert@lambertfam.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message