Skip to content

Commit

Permalink
Document how password_disabled' and smb' interact.
Browse files Browse the repository at this point in the history
  • Loading branch information
arensb committed May 6, 2024
1 parent f06ff01 commit 0b58eb0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions plugins/modules/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@

# Create and manage users.

# XXX - Bug with passwordless users and SMB under TrueNAS SCALE:
# https://github.com/arensb/ansible-truenas/issues/12
# SMB and users with disabled passwords:
#
# Still not sure of the contours of this one. Under TrueNAS CORE, it
# looks as though a user's Unix and SMB passwords are more or less
# independent (XXX this needs to be checked).
# Under TrueNAS SCALE, a user with SMB enabled also needs to have a
# password. TrueNAS CORE allows you to create a user with disabled
# password, but also with SMB turned on.
#
# Under SCALE, however, it sounds as though a user must have a
# password in order to have access to SMB.
# I think the best way to deal with this is simply to document the
# behavior.

DOCUMENTATION = '''
---
Expand Down Expand Up @@ -113,6 +112,8 @@
- If you need that functionality, do something like prepend "*LOCK*"
to the crypt string when locking a user, then remove it when
unlocking.
- Note that under TrueNAS SCALE, a user with C(password_disabled)
may not use SMB, so be sure to set C(smb: false).
type: bool
default: false
shell:
Expand All @@ -123,6 +124,8 @@
smb:
description:
- Specifies whether user should have access to SMB shares.
- Under TrueNAS SCALE, a user with C(smb) enabled may not have
their password disabled.
type: bool
default: true
ssh_authorized_keys:
Expand Down Expand Up @@ -405,7 +408,7 @@ def main():
)
mod_mutually_exclusive = []
mod_required_if = [
['password_disabled', False, ['password']]
['password_disabled', False, ['password']],
]

# Make adjustments for systems using the old API.
Expand Down

0 comments on commit 0b58eb0

Please sign in to comment.