*BSD News Article 42402


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!news.moneng.mei.com!howland.reston.ans.net!news.sprintlink.net!uunet!zib-berlin.de!ceres.fokus.gmd.de!nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!saph2.physik.uni-bonn.de!juengst
From: juengst@saph2.physik.uni-bonn.de (Henry G. Juengst)
Newsgroups: comp.os.386bsd.questions
Subject: Re: problem with <su root>
Date: 13 Feb 1995 02:49:18 GMT
Organization: Physikalisches Institut der Universitaet Bonn
Lines: 154
Distribution: world
Message-ID: <3hmhbe$8sa@news.rhrz.uni-bonn.de>
References: <E.R.Cramer.2.000AB6D1@inter.NL.net>
Reply-To: juengst@saph2.physik.uni-bonn.de
NNTP-Posting-Host: saph1.physik


In article <E.R.Cramer.2.000AB6D1@inter.NL.net>, E.R.Cramer@inter.NL.net (Peter Dekkers) writes:
>After installing FreeBSD 2.0 snap 950112 I've got a problem.
>When I type <su root> I get an error saying I don't belong to the right group.
>Even after changing my GID to 0 (wheel)  by using <chpass> , I still got this 
>message.
>Can anyone tell me what I do wrong ????
>Also I would like to know how to delete users from the system and how to 
>belong to more than one group.
>
>Perhaps there is a file with information about this ????????
>

The following patch will solve your problem. It is based on su.c from
NetBSD-current (after 1.0). I have included the patch (su.c.patch) and
the patched (!) source file (su.c).

Description:
- use getegid() function call to look for the effective gid (that's why
  you had problems)
- use an additional group "su" to grant "su" permission. I (as normal
  user) don't like to be a member of gid 0, just to call "su", because
  some files could have gid 0 and if write permission is granted for
  gid 0, then I could modify these files, what I DON'T want to do, if
  I am not the super user. Humans make errors. Software has bugs. :-)
  Therefor, just add a new group "su" and add your account there
  (instead of wheel).

>
>Peter Dekkers , Rotterdam , Holland
>
>

Henry

begin 644 su.tar.gz
M'XL("/[#/B\"`W-U+G1A<@#M.VMSVEBR^0J_HLUL8B`8@^W$.WB3++;EF#(&
M+Q+QY&92K)`$J`")E80=-N/_OMU]CA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$48'^3
M(F!R.<S<HE>]QKKJX!54CVI'KVO55WP#-+N'-6K:ULPUEG,75A]%"97#VL%!
MK7)(NUYEB\L/_8;JJZ-2];@*/("ET??>TP"0SD'"^IK=@:?<UEB_I4'[-MW3
MH`Y+?NB)?&'E_@,B0-LR5%+FA[0D_LI_`B]?#@L2(9EW%!,#*0&5)W_O!VT)
M.?$)6XY$353Q^R&)U.IG?;H24`@WRLMQ](N^Y__;7[0!4K]IT]0C7[5)YUA;
M?JX`ON_];VI+^MV>-*TA!O[H^ST[L!'H[[KCDPHKY9[/#CQRZV4'GG;O)?70
MQZ^GI.]YZ@65-`@/W^9#XM[/#^+!OW_[Y\D,J##\_T(F/^DF4#H+TUSE#[T-
M]`BXR)E^\T;08TP0MX)VX(_UH]O$=_MLG^VS?;;/]MD^VV?[;)_MLWVVS_;9
3/MMG^VR?_P?/OP#H17M,`%```-O$
`
end

--
juengst@saph5.physik.uni-bonn.de   [131.220.221.66]  (internet)
juengst@boss1.physik.uni-bonn.de   [131.220.221.30]
saph1::juengst                     [13.259]          (decnet)

Any opinions in this mail are my own.