0

Just started with FreeBSD and I am not sure whether I need to be root to install programs or not? For example, the manual for installing X11 never says that we should issue su command.

However - it does not work without being a root, so my current solution is to add my account to wheel group, and do su whenever I do pkg_add -r or anything. Is this the "best practice" in unix?

The handbook does really talk about it in the user accounts section. Any tips appreciated.

2 Answers 2

2

It says you have to run

# cd /usr/ports/x11/xorg
# make install clean

And in the preface, it says

Examples starting with # indicate a command that must be invoked as the superuser in FreeBSD. You can login as root to type the command, or login as your normal account and use su(1) to gain superuser privileges.

# dd if=kern.flp of=/dev/fd0

1
  • D'oh - missed that in the preface, thanks! Mar 24, 2012 at 8:38
1

For the FreeBSD itself and installed programs, it doesn't matter how exactly you reach root permissions; the only needed thing is that you shall be root to modify most configs, install packages, etc.

OTOH there are general Unix recommendations to limit times when you have root permissions to minimal really required, especially when you aren't careful in checking environment on issuing command, when you work from shared workplace, etc. Run only separate commands using `sudo' (can be installed from ports), but limit time spent in root shell to special modes (e.g. total system upgrade).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .