How to create a user account with the same permission as "root" ?

Jerry McAllister jerrymc at msu.edu
Thu Oct 11 08:10:28 PDT 2007


On Thu, Oct 11, 2007 at 07:34:54PM +0800, Erich Dollansky wrote:

> Hi,
> 
> FreeBSD is not Windows.

True statement - thank heaven.

> 
> You cannot have another "root" in the system.

Unless I misunderstand what you are saying, this is NOT a true statement.
You can create as many ids with a '0' UID as you want.   It may not be
a good idea, but it works just fine.  Then, if you give it the same
home directory and shell, it will be almost impossible to distinguish
how it functions from how the 'root' account functions.

Now, if you mean having two accounts named "root", then you can't have
that, but that isn't what you imply by your following statement about
creating an account called 'william'.

Having said all that, doing part of what follows is better -- create
a regular user account with its own UID (eg not 0) and then add it
to the 'wheel' group by editint /etc/group file.

But, then, do not make all files have group wheel permission.
Instead, when you want to work on those files or other things
root might do, use su(1) to change your working UID to '0' temporarily.

That way, files will have normal owner and group, user will have
normal UID and GID, and everything will work nicely.

> 
> What you can do is the creation of the group "wheel" and put "william" 
> into this group.
> 
> Allow then all members of "wheel" to access the files needed by the 
> group "wheel".

Not the best idea.

> 
> I would not do this as it creates many security wholes.
> 
> If you just want to do something as root without being root, use su.

Yes, do this.  I guess you rethought what you wrote about the files.

////jerry

> 
> Erich
> 
> williamkow wrote:
> >Finally, I manage to setup X.org and then KDE 3.5.4 running on FreeBSD 
> >6.2-Release.
> >I created a user account named "william" and do not assign any group as 
> >I do not know what are the list of group name for me to select. To start 
> >KDE, i use command "kdm" but I can only logon using the newly created 
> >user name "william", but it do not have same permission/access rights as 
> >"root" account.
> >Please show on how to enable this user account, with the same permission 
> >as root ?
> >Thank you.
> >_______________________________________________
> >freebsd-questions at freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >To unsubscribe, send any mail to 
> >"freebsd-questions-unsubscribe at freebsd.org"
> >
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list