Bug 270804 - FreeBSD Handbook: Network Servers: … Samba Users: correct the pbedit(8) example
Summary: FreeBSD Handbook: Network Servers: … Samba Users: correct the pbedit(8) example
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
URL: https://github.com/freebsd/freebsd-do...
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2023-04-12 20:59 UTC by Anthony Bravolisimo
Modified: 2023-05-03 22:28 UTC (History)
2 users (show)

See Also:


Attachments
ADOC DIFF (561 bytes, patch)
2023-04-14 19:36 UTC, Anthony Bravolisimo
no flags Details | Diff
PO DIFF (581 bytes, text/plain)
2023-04-14 19:37 UTC, Anthony Bravolisimo
no flags Details
PO DIFF (581 bytes, patch)
2023-04-14 19:37 UTC, Anthony Bravolisimo
no flags Details | Diff
Patch file (891 bytes, patch)
2023-05-03 21:13 UTC, Anthony Bravolisimo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Bravolisimo 2023-04-12 20:59:59 UTC
I came across a small type in Section 31.10.1.3. Samba Users. The code in the handbook says to use:

# pdbedit -a username

When using the command above, the results below are displayed:

root@mercury:/home/anthony # pdbedit -a anthony
new password:
retype new password:
Failed to add entry for user .
root@mercury:/home/anthony #

In my experience, the -u flag needs to be added to the command

# pdbedit -a -u username

This way when I run the command, I get a successful result. See below

root@mercury:/home/anthony # pdbedit -a -u anthony
new password:
retype new password:
Unix username:        anthony
NT username:          
Account Flags:        [U          ]
User SID:             S-1-5-21-3825970801-536950418-1120046553-1002
Primary Group SID:    S-1-5-21-3825970801-536950418-1120046553-513
Full Name:            anthony
Home Directory:       \\MERCURY\anthony
HomeDir Drive:        
Logon Script:         
Profile Path:         \\MERCURY\anthony\profile
Domain:               MERCURY
Account desc:         
Workstations:         
Munged dial:          
Logon time:           0
Logoff time:          9223372036854775807 seconds since the Epoch
Kickoff time:         9223372036854775807 seconds since the Epoch
Password last set:    Sat, 08 Apr 2023 22:12:37 EDT
Password can change:  Sat, 08 Apr 2023 22:12:37 EDT
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

For your reference, here is the system I am running the command on

root@mercury:/home/anthony # uname -a
FreeBSD mercury 13.1-RELEASE-p6 FreeBSD 13.1-RELEASE-p6 GENERIC amd
Comment 1 Anthony Bravolisimo 2023-04-13 14:08:14 UTC
MANPAGE for pdbedit also states:


-u|--user username
	   This	option specifies the username to be used for the operation
	   requested (listing, adding, removing). It is	required in add,
	   remove and modify operations	and optional in	list operations.
Comment 2 Anthony Bravolisimo 2023-04-14 19:36:36 UTC
Created attachment 241487 [details]
ADOC DIFF

ADOC DIFF
Comment 3 Anthony Bravolisimo 2023-04-14 19:37:02 UTC
Created attachment 241488 [details]
PO DIFF

PO DIFF
Comment 4 Anthony Bravolisimo 2023-04-14 19:37:27 UTC
Created attachment 241489 [details]
PO DIFF

PO DIFF
Comment 5 Anthony Bravolisimo 2023-04-14 19:37:55 UTC
Find enclosed the diff files to correct the entry within the handbook
Comment 6 Daniel Ebdrup Jensen freebsd_committer freebsd_triage 2023-05-03 13:19:13 UTC
It'd be fantastic if you could submit a diff created via git-format-patch(1), as this preserves name + email of the author (which you'll need to set via git-config(1) if you haven't), as well as the original commit data, and it also guarantees full context.

I only need the diff to include the .adoc file, as the .po files relate to the translation project using WebLate.

Once I have it, I'll see if I can't get this expedited.
Comment 7 Anthony Bravolisimo 2023-05-03 21:13:19 UTC
Created attachment 241959 [details]
Patch file

Patch file attached
Comment 8 Daniel Ebdrup Jensen freebsd_committer freebsd_triage 2023-05-03 22:28:20 UTC
This landed as doc e7be269af4