The manpage for pw states in a section for "USER OPTIONS" : USER OPTIONS The following options apply to the useradd and usermod commands: [-n] name Required unless -u uid is given. Specify the user/account name. In the case of usermod can be a uid. -u uid Required if name is not given. Specify the user/account numeric id. In the case of usermod if paired with name, changes the numeric id of the named user/account. Usually, only one of these options is required, as the account name will imply the uid, or vice versa. However, there are times when both are needed. For example, when changing the uid of an existing user with usermod, or overriding the default uid when creating a new account with useradd. To automatically allocate the uid to a new user with useradd, then do not use the -u option. Either the account or userid can also be provided immediately after the useradd, userdel, usermod, or usershow keywords on the command line without using the -n or -u options. Therefore I would think that "pw usermod -n 16411 -s /bin/sh" would be accepted since "In the case of usermod can be a uid." However : styx# pw usermod -n 16411 -s /bin/sh pw: no such user `16411' styx# I certainly do not want to change the uid of the user. The manpage states "-u uid" results in "In the case of usermod if paired with name, changes the numeric id of the named user/account. Well I do not want to change the userid number. However it seems I need to state the username and not the uid : styx# pw usermod -n dclarke -s /bin/sh styx# Seems unclear to me.
<https://man.freebsd.org/cgi/man.cgi?query=pw&sektion=8&manpath=FreeBSD+14.0-CURRENT#USER_OPTIONS> > … [-n] … Required … can be a uid. … (In reply to Dennis Clarke from comment #0) I have the same interpretation of what's in the manual page. root@mowa219-gjp4-8570p-freebsd:~ # pw usermod -n 1002 -s sh pw: no such user `1002' root@mowa219-gjp4-8570p-freebsd:~ # pw usermod -s sh -n 1002 pw: no such user `1002' root@mowa219-gjp4-8570p-freebsd:~ # pw usermod -u 1002 -s sh root@mowa219-gjp4-8570p-freebsd:~ # pw usermod -s tcsh -n grahamperrin root@mowa219-gjp4-8570p-freebsd:~ # uname -KU 1400078 1400078 root@mowa219-gjp4-8570p-freebsd:~ # tail -n 2 /var/log/userlog 2023-01-28 11:43:28 [root:usermod] grahamperrin(1002):grahamperrin(1002):Graham Perrin:/home/grahamperrin:/bin/sh 2023-01-28 11:43:50 [root:usermod] grahamperrin(1002):grahamperrin(1002):Graham Perrin:/home/grahamperrin:/bin/tcsh root@mowa219-gjp4-8570p-freebsd:~ # dteske@ please are we misinterpreting? Or has there been a change in behaviour of the command?