From owner-freebsd-questions@FreeBSD.ORG Tue Nov 2 19:32:38 2004 Return-Path: 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 003C816A4CF for ; Tue, 2 Nov 2004 19:32:38 +0000 (GMT) Received: from bsdie.tunasafedolphin.org (tunasafedolphin.org [207.44.144.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89C9743D54 for ; Tue, 2 Nov 2004 19:32:37 +0000 (GMT) (envelope-from tonway@fcuker.org) Received: from webmail.tunasafedolphin.org (bsdie.tunasafedolphin.org [127.0.0.1])iA2JYIm4067236; Tue, 2 Nov 2004 14:34:18 -0500 (EST) (envelope-from tonway@fcuker.org) Received: from adsl-068-209-252-201.sip.asm.bellsouth.net ([68.209.252.201]) (SquirrelMail authenticated user tonway@fcuker.org); by webmail.tunasafedolphin.org with HTTP; Tue, 2 Nov 2004 14:34:19 -0500 (EST) Message-ID: <60057.68.209.252.201.1099424059.squirrel@68.209.252.201> In-Reply-To: <200411021925.iA2JPsV06192@clunix.cl.msu.edu> References: <4186DA65.9020909@ferrises.com> from "Dan Ferris" at Nov 01, 2004 05:52:53 PM <200411021925.iA2JPsV06192@clunix.cl.msu.edu> Date: Tue, 2 Nov 2004 14:34:19 -0500 (EST) From: "Tim Tonway" To: "Jerry McAllister" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal cc: dan@ferrises.com cc: questions@freebsd.org Subject: Re: Really Dumb Question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2004 19:32:38 -0000 >> >> This is probably a dumb question. >> >> I need to add a user that can su to root. So.... >> >> I add the user with adduser, invite the user into the wheel group (GID >> 0) then add the user to the wheel group in /etc/group >> >> su still fails. What am I missing? It's go to be something really >> dumb. > > It might help to know what error you are getting. > It is impossible to know what exactly you tried and what exactly > you saw as the result, so it is difficult to know what to tell you. > > But, a comment anyway. > > You do not need to make the primary group be 'wheel', although I suppose > you can if you like. The primary group for a user is the one they are > assigned in the /etc/passwd (master.passwd) file. It is the one you > give them with adduser. > > I would suggest making the user's primary group, whatever group you would > make them for other than the 'su' consideration. > > Then, add them to the wheel group as one of their secondary groups by > editing the /etc/group file and adding the user on to the wheel group. > If, for example, the username is privuser, just add ',privuser' on to > the end of the line defining the wheel group (minus the quote marks > and without a space before the comma). > > Just edit /etc/group with vi. > > This way, you can move the user in to and out of the wheel group without > affecting group ownership of the user's files. If you make the user's > primary group to be wheel, the user's files will most likely end up > with wheel for group ownership and you would have to change all that > if you wanted to remove that user from the wheel group, but not delete > the account. > > ////jerry > You can also use pw for this. To set primary: pw usermod -g group -n user To add a secondary group: pw usermog -G group -n user -Tim