How to sudo in FreeBSD

by
Share this Article: Facebook2Google+0Twitter6LinkedIn0Reddit0StumbleUpon0

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 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC 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 $
#
wheel:*:0:root,pirat9

save  and  exit

Try now 

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

That `s all.

For questions please refer to our Q/A forum at : http://ask.unixmen.com/


Share this Article: Facebook2Google+0Twitter6LinkedIn0Reddit0StumbleUpon0