Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2002 23:51:40 -0500
From:      Scott Lambert <lambert@lambertfam.org>
To:        freebsd-isp@FreeBSD.ORG
Subject:   Re: su and root password
Message-ID:  <20021114045140.GB82569@laptop.lambertfam.org>
In-Reply-To: <002701c28b94$c378f4e0$a977ca41@yogi>
References:  <002701c28b94$c378f4e0$a977ca41@yogi>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021114045140.GB82569>