Jump to content

Allow users to change their SMB passwords on their own via SSH


Jane

Recommended Posts

This is not true. ssh-login is by the users-id in this case. What is more the defined shell is the smbpasswd command, other commands are not possible.

 

Take a look at the google translated configuration instructions:

 

# 1. Store the script in /boot/config/allowsmbpwchange
# 2. echo bash /boot/config/allowsmbpwchange >> /boot/config/go
# 3. Activate in Unraid under Settings -> Management Access -> Use ssh
# 4. Restart Unraid
# 5. SMB password change e.g. from Windows with "ssh servername -l username", password see below.
#
# Configuration
#
# SMB minimum password length when changed by user.
# If the value set here during the first execution is to be changed, 
# the file /tmp/.allowsmbpwchange_1strun is to be deleted.
#
MINPASSWORDLENGTH=8
#
# Changed SMB passwords should be saved to the USB stick every how many minutes.
# to be preserved in a reboot? This value also indicates how many minutes every
# the SMB password change by user is activated for newly created users.
# If the value set here during the first execution is to be changed, 
# the file /tmp/.allowsmbpwchange_1strun is to be deleted.
#
UPDATE INTERVAL=30
#
# To change the SMB password, users log in via SSH with their name and the following password.
# This password can also be empty, but this means that the user is
# shown in the dashboard as "unprotected", which is irrelevant since they have an SMB password.
# Of course, a new SMB password cannot be assigned without a current SMB password. That's why
# it doesn't matter that the password defined here is the same for everyone.
#
PASSWORD="pwchg"

Edited by Jane
  • Upvote 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...