Permissions needed to run 'su'

Mark Bush bush at ecs.ox.ac.uk
Wed Mar 27 23:48:52 AEST 1991


In article <1991Mar26.013137.22927 at casbah.acns.nwu.edu> navarra at casbah.acns.nwu.edu (The MaD ScIeNTiSt) writes:
>In article <4880 at lib.tmc.edu> dct at mdaali.cancer.utexas.edu (David C. Tuttle) writes:
>>I administer a Sun 3/110 running 4.0.3 (still... :-) and have a small 
>>mystery on my hands. I think it's got a simple answer - I just don't know 
>>what it is.
>>
>>Today, I found that I could not "su" to root from my no-special-privileges 
>>account (i.e., an account not in the "wheel" group).  My administrator 
>>account (in the "wheel" group) was not affected.  Now, I wonder what I (or 
>>someone else?) have done to cause this.  And more generally, what does one 
>
>        Under versions of 4.2BSD or later, only users in the wheel group
> listed in /etc/groups are allowed to su to root. --
> 
> check  out su2 though -- that might work from you other account.

But he's running SunOS!  Although SunOS4.0.3 is based on 4.3BSD, the
functionality is not the same.  On our system, there are no non-root
accounts in group wheel, yet for SunOS3.5, SunOS4.0.3, SunOS4.1 and
SunOS4.1.1 I can su to root from my own account.

What results do you get when you su from your no-privilege account?

I found that I got root's environment when I su'ed to my admin account (home
directory /, shell /bin/csh) --- ie. my shell was csh and my prompt had a
`#' in it.

When I su'ed to `root' on a 4.0.3 machine, I kept my own environment
(including my shell - bash!) so it *appears* as if the su failed, but `id'
showed that I was, indeed, root and I did have root privileges --- ie. I had
my normal-user shell (bash) and home directory (not /)

On a SunOS4.1 or SunOS4.1.1 machine, su'ing to root gives me root's
environment --- ie. home directory /, shell csh.

So, when you su, try `id' to see if you really have failed to su.

Mark



More information about the Comp.unix.admin mailing list