How  to sudo   in  FreeBSD

How to sudo in FreeBSD

How to enable su  in FreeBSD?

This  is my  installed  FreeBSD 9.1

$ uname -aFreeBSD FreBSD-Unixmen 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 amd64$

try  to make  su  to  other  users

$ su - root
su: Sorry


Go to sudo ports directory 

# cd /usr/ports/security/sudo
# make install clean

add  the  user  to   the  wheel group

vi /etc/groups

$ cat /etc/group
# $FreeBSD: release/9.1.0/etc/group 218046 2011-01-28 22:28:12Z pjd $

save  and  exit

Try now 

$ su -
root@FreBSD-Unixmen:/root #

That `s all.

  • PePa

    I don’t know much about BSDs, but I don’t see why you would need sudo at all. If you would just add yourself to the wheel group, you should be able to su to root without needing to build sudo, right??

  • tangram

    Yup. Plus the article title is totally misleading, it leaves the reader into believing that FreeBSD doesn’t come with su… *facepalm*

    In FreeBSD (or any other *nix system) adding a user to wheel doesn’t require installing sudo.

    My suggestion: do yourself a favor and edit the article.