man 5 passwd says the fifth field is "user name or comment field". It's designed to contain human-readable information about the user. It's not important to the issue.
su is not
sudo. The first operand (see this) is interpreted as user you want to become.
su [options] [username]
su command is used to become another user during a login session. Invoked without a username,
su defaults to becoming the superuser. […]
Additional arguments may be provided after the username, in which case they are supplied to the users login shell. In particular, an argument of
-c will cause the next argument to be treated as a command by most command interpreters. The command will be executed by the shell specified in
/etc/passwd for the target user.
su pkg install rsync mtr
means "change user to
pkg and run
/login/shell/of/this/user install rsync mtr". Probably no user named
pkg exists, hence
BAD SU <user> to pkg. Note
<user> to pkg corresponds with the fact the command tried to change
This is not what you wanted in the first place. I think you wanted
su -c 'pkg install rsync mtr'
(credits to this comment, although it lacks explanation).
sudo the syntax could be more like what you tried:
sudo pkg install rsync mtr
The most visible difference is
sudo asks for the current user's password (unless configured otherwise);
su asks for the target user's password. More about differences: here.