Adding and Removing Users

Now that we covered permissions and ownership, we need to turn our attention to expanding the system's user base to include more users and groups.

Use the adduser script to add users to the system. This program differs somewhat in workflow from the adduser or useradd scripts you might be used to using on a Linux system, but what it accomplishes is the same. You must be root in order to run adduser. The first time you run adduser, the script sets up a configuration file with a set of defaults; the next time you run it, you can use the -s (“silent”) option to use these defaults and it will only ask you for the basic details on each user. Listing 10.2 shows a sample initial run of the script:

Listing 10.2. A Sample adduser ...

Get FreeBSD® Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.