Revert "TODO: smb2: simplify preauth_hash calculation..."
[wireshark-sm.git] / README.bsd
blob19cb07a405af080807e755116ecf90e2a5c244a6
1 Installing Wireshark on FreeBSD/OpenBSD/NetBSD/DragonFly BSD
2 ========================================================================
4      1. Berkeley Packet Filter (BPF) requirement
5      2. Running Wireshark as a non-root user
7 For general installation instructions, see the INSTALL file, along with
8 the Developer's Guide located at https://www.wireshark.org/docs/ and
9 in the docbook/ directory.  Additional BSD specific notes and requirements
10 follow.
12 1. Berkeley Packet Filter (BPF) requirement
13 --------------------------------------------
14 In order to capture packets (with Wireshark/TShark, tcpdump, or any
15 other packet capture program) on a BSD system, your kernel must have the
16 Berkeley Packet Filter mechanism enabled.  The default kernel
17 configurations in recent versions of BSD systems have this enabled
18 already.  To verify the bpf device is present, look in the /dev
19 directory:
21     ls -l /dev/bpf*
23 You should see one or more bpf devices listed similar to this:
25     crw-------  1 root  wheel    0,  90 Aug 10 21:05 /dev/bpf0
26     crw-------  1 root  wheel    0,  91 Aug 10 21:05 /dev/bpf1
28 Packet-capturing programs will pick the first bpf device that's not in
29 use.  Recent versions of most BSDs will create bpf devices as needed, so
30 you don't have to configure the number of devices that will be
31 available.
33 2. Running wireshark as a non-root user
34 -------------------------------------------
35 Since the bpf devices are read-only by the owner (root), you normally
36 have to run packet capturing programs such as Wireshark as root.  It is
37 safer to run programs as a non-root user if possible.  To run Wireshark
38 as a non-root user, you must change the permissions on the bpf device(s).
39 If you are the only user that needs to use Wireshark, the easiest way
40 is to change the owner of each bpf device to your username.  You can also
41 add the read/write ability to the group (typically wheel) and add users
42 that need to use Wireshark to the wheel group.  Check your operating
43 system's documentation on how to make permanent these changes as they
44 are often reset upon reboot; if /dev is implemented with devfs, it might
45 be possible to configure devfs to create all bpf devices owned by a
46 particular user and/or group and with particular permissions.  In
47 FreeBSD 6.0 and later this can be done by creating an /etc/devfs.rules
48 file with content such as
50         [localrules=10]
51         add path 'bpf*' {mode and permissions}
53 where "mode and permissions" can include clauses such as
55         mode {octal permissions}
57 to set the permissions on the device (e.g., "mode 0660" to set the
58 permissions to rw-rw-r--),
60         user {user}
62 to set the user who owns the device, or
64         group {group}
66 to set the group that owns the device and adding a line such as
68         devfs_system_ruleset=localrules
70 to /etc/rc.conf.  For example, an /etc/devfs.rules file with
72         [localrules=10]
73         add path 'bpf*' mode 0660 group wheel
75 will grant read and write permissions on all BPF devices to all users in
76 the "wheel" group.