the given procedure should note, that chsh has to be run as root and needs a user argument, if the shell should not be changed for root. sudo chsh -s /usr/local/bin/bash someuser Run as non-root you get a password prompt, where it is not obvious that the password is for root: chsh -s /usr/local/bin/bash Password:
(In reply to Jürgen Weber from comment #0) FreeBSD 12.2-STABLE #2 r365646 lrwxr-xr-x 1 root wheel 6 12 Sep 16:39 /usr/bin/chsh -> chpass -r-sr-xr-x 1 root wheel 23808 12 Sep 16:39 /usr/bin/chpass You do not need to be root - notice the permissions on chpass The password requested, if run by a user, is the user's password and not root.
OK, deep in the chsh man page it says that you must enter a password. Still, it is unusual for a user to have to enter his password. It should be mentioned in the doc section, please.
(In reply to Jürgen Weber from comment #2) Noting that this is for/about section 3.9.1.
Created attachment 239721 [details] Patch file for chsh instructions I've added a line clarifying the password requirement to the handbook. I've also just added that the user needs to log off and back on to actually use the shell to avoid any confusion.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/doc/commit/?id=0536b0e71685f6e1aca3d8f8aab20254a4bfdf92 commit 0536b0e71685f6e1aca3d8f8aab20254a4bfdf92 Author: Ciarán Ainsworth <ciaranainsworth@posteo.net> AuthorDate: 2023-01-28 10:55:44 +0000 Commit: Sergio Carlavilla Delgado <carlavilla@FreeBSD.org> CommitDate: 2023-01-28 10:55:44 +0000 Basics handbook chapter - change shell clarifications * Clarify that the user must enter the password * Also note that log off and log in must be done PR: 252951 documentation/content/en/books/handbook/basics/_index.adoc | 3 +++ 1 file changed, 3 insertions(+)
Thanks for the patch!