From owner-freebsd-questions Tue May 14 5:29:12 2002 Delivered-To: freebsd-questions@freebsd.org Received: from terminal.sil.at (terminal.sil.at [194.152.178.15]) by hub.freebsd.org (Postfix) with ESMTP id 954CC37B40D for ; Tue, 14 May 2002 05:28:58 -0700 (PDT) Received: from terminal.sil.at (localhost [127.0.0.1]) by terminal.sil.at (8.9.2/8.9.2) with ESMTP id OAA19282 for ; Tue, 14 May 2002 14:28:51 +0200 (CEST) Message-Id: <200205141228.OAA19282@terminal.sil.at> X-Mailer: exmh version 2.1.1 01/07/2000 To: freebsd-questions@FreeBSD.ORG Subject: su and the ``-c'' option. X-Face: "0|_!}6Ay;=lSa@qs\q$u2RZUTyW(m(?80f[OF3eR:4uk6rd&+9lUw"6ACgq]hyak/Io Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hi, why is the ``-c'' (execute command) option of the ``su'' needed when i want to execute a command as a different user? and why is this option not in the manpage (its only found in the EXAMPLES section of su(1)): su [-] [-Kflm] [-c class] [login [args]] i find it a bit confusing that there is also a ``-c'' for the class. it then says in su(1): If the optional args are provided on the command line, they are passed to the login shell of the target login. so this porobably means that the ``-c command'' is then passed to the login shell which might be i.e. /bin/sh. thus it ends up in: /bin/sh -c command. but why do i needs this? it could also be /bin/sh command, or? regards, cjm -- SILVER SERVER \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\ \\ \ cjm@sil.at, cjm@enemy.org, neo@bsdger.org www.sil.at | www.enemy.org ** PGP-Key-ID: 0xA941452D | "Why are we hiding from the police, dad?" - --------------------------| "Because we use vi, son. They use Emacs". To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message