From owner-freebsd-questions  Wed Jul 31 14:19:31 2002
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 C65BB37B400
	for <freebsd-questions@FreeBSD.ORG>; Wed, 31 Jul 2002 14:19:28 -0700 (PDT)
Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1565C43E4A
	for <freebsd-questions@FreeBSD.ORG>; Wed, 31 Jul 2002 14:19:27 -0700 (PDT)
	(envelope-from fgleiser@cactus.fi.uba.ar)
Received: from localhost (localhost [127.0.0.1])
	by cactus.fi.uba.ar (8.11.6/8.11.6) with ESMTP id g6VLHC111376;
	Wed, 31 Jul 2002 18:17:13 -0300 (ART)
	(envelope-from fgleiser@cactus.fi.uba.ar)
Date: Wed, 31 Jul 2002 18:17:12 -0300 (ART)
From: Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
X-X-Sender:  <fgleiser@localhost>
To: Phil Gates <p_gates@fuse.net>
Cc: <freebsd-questions@FreeBSD.ORG>
Subject: Re: write a script to get root permission
In-Reply-To: <020e01c238d6$41ce6f80$5d7e880a@zoomtown.com>
Message-ID: <20020731181516.C6656-100000@localhost>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-questions@FreeBSD.ORG
Precedence: bulk
List-ID: <freebsd-questions.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-questions>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-questions>
X-Loop: FreeBSD.ORG

On Wed, 31 Jul 2002, Phil Gates wrote:

> Thanks everybody on ftp only login all your suggestions worked. I have another problem and I know .  The person that I am working for want me to write a script in ksh to do some root commands and thenexit.  Is there a way to get root permission in a script.


You cant make a suid script. The kernel ignores the suid bit in scripts
because it is a huge security hole.

If you need to grant partial root privilleges to a user, use sudo.


			Fer

>
> Thanks
>
> Phil
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message