Bug 252951 - 3.9.1. Changing the Shell only works for root
Summary: 3.9.1. Changing the Shell only works for root
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-23 19:24 UTC by Jürgen Weber
Modified: 2021-01-23 23:00 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Weber 2021-01-23 19:24:42 UTC
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:
Comment 1 Trev 2021-01-23 21:52:38 UTC
(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.
Comment 2 Jürgen Weber 2021-01-23 23:00:41 UTC
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.