https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246760

            Bug ID: 246760
           Summary: ZFS usermount sysrc command invalid
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Documentation
          Assignee: [email protected]
          Reporter: [email protected]

On https://www.freebsd.org/doc/handbook/zfs-zfs.html under heading 19.4.7.2.
Sending Encrypted Backups over SSH the text says the following.

"To mount the pool, the unprivileged user must own the directory, and regular
users must be allowed to mount file systems. On the receiving system:

# sysctl vfs.usermount=1
vfs.usermount: 0 -> 1
# sysrc -f /etc/sysctl.conf vfs.usermount=1
# zfs create recvpool/backup
# zfs allow -u someuser create,mount,receive recvpool/backup
# chown someuser /recvpool/backup"

When I type the following as using sudo on my 12.1-RELEASE-p2 system I get an
error.

[mike@nas ~]$ sudo sysrc -f /etc/sysctl.conf vfs.usermount=1
sysrc: vfs.usermount: name contains characters not allowed in shell

When I change to the root user I get the same error.

[mike@nas ~]$ sudo -i
root@nas:~ # sysrc -f /etc/sysctl.conf vfs.usermount=1
sysrc: vfs.usermount: name contains characters not allowed in shell


It seems like the valid characters variable in /usr/share/bsdconfig/sysrc.subr 
is incorrect.

VALID_VARNAME_CHARS="0-9ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_"

Should it include a period?

Also, I believe the documentation should clarify when a user needs to run as
root versus when to run as a non-root user. At least it seems like every
command should be run as root but it is not clear.

I had to manually edit the /etc/sysctl.conf file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "[email protected]"

Reply via email to