From 6991e21be23a3fb3e98422800fe217dea625efcf Mon Sep 17 00:00:00 2001 From: hubertf Date: Sat, 5 Oct 2002 14:07:04 +0000 Subject: [PATCH] Make example clearer, that the -c _after_ the login is passed to the shell. Addresses PR 18538 by reed@reedmedia.net --- usr.bin/su/su.1 | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/usr.bin/su/su.1 b/usr.bin/su/su.1 index 7758d96dd68d..cbf4ec40f9b1 100644 --- a/usr.bin/su/su.1 +++ b/usr.bin/su/su.1 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)su.1 8.2 (Berkeley) 4/18/94 -.\" $NetBSD: su.1,v 1.23 2001/12/08 19:17:03 wiz Exp $ +.\" $NetBSD: su.1,v 1.24 2002/10/05 14:07:04 hubertf Exp $ .\" .Dd March 7, 2001 .Dt SU 1 @@ -98,6 +98,9 @@ Do not attempt to use Kerberos to authenticate the user. .It Fl c Specify a login class. You may only override the default class if you're already root. +See +.Xr login.conf 5 +for details. .It Fl f If the invoked shell is .Xr csh 1 , @@ -216,7 +219,25 @@ execute: su -l username .Ed .Pp -To execute arbitrary command with privileges of user username, execute: +When a +.Fl c +option is included +.Em after +the +.Ar login +name it is not a +.Nm +option, because any arguments after the +.Ar login +are passed to the shell. (See +.Xr csh 1 , +.Xr ksh 1 +or +.Xr sh 1 +for details.) +To execute arbitrary command with privileges of user +.Em username , +execute: .Bd -literal -offset indent su username -c "command args" .Ed