*New 12.1 series Release:
2019-11-08: XigmaNAS 12.1.0.4.7091 - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[SOLVED] Users not in SMB after reboot

CIFS/SMB network sharing.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
liam
NewUser
NewUser
Posts: 6
Joined: 10 Jul 2014 16:20
Status: Offline

[SOLVED] Users not in SMB after reboot

#1

Post by liam » 30 Jan 2019 19:37

Hi

My NAS is running 11.2.0.4 - Omnius (revision 6400)

I have 2 users who have SMB shares that they need to authenticate too. After I turned off AFP and went fully to SMB for their Time Machine targets I noticed that they were unable to connect to their SMB shares after a reboot. I can ssh in and do an 'smbpassword -a username' for each of them, and then it's all OK until the next reboot.

How do I get the smb user config to persist across reboots? I can't find anywhere in the web GUI to do the equivalent of the smbpassword command, and the change in the shell isn't persisted.

Thank you
Cheers, Liam
  • ProLiant MicroServer Gen8
    11.2.0.4 - Omnius (revision 6400)
    Intel(R) Celeron(R) CPU G1610T @ 2.30GHz
    16GB Memory
    Boot - USB flash drive
    4 x Hitachi 2TB drives in a 7.28TB ZFS pool

liam
NewUser
NewUser
Posts: 6
Joined: 10 Jul 2014 16:20
Status: Offline

Re: Users not in SMB after reboot

#2

Post by liam » 30 Jan 2019 22:35

To be clear, I know where the config.xml file it, and I know how to remount the filesystem rw to modify/replace the file. I think that passdb.tdb is the file is that gets updated running the smbpassword -a command. What I don't know is what needs to get entered in the config.xml file to recreate the users on a reboot.

Thanks, Liam
  • ProLiant MicroServer Gen8
    11.2.0.4 - Omnius (revision 6400)
    Intel(R) Celeron(R) CPU G1610T @ 2.30GHz
    16GB Memory
    Boot - USB flash drive
    4 x Hitachi 2TB drives in a 7.28TB ZFS pool

User avatar
ms49434
Developer
Developer
Posts: 746
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Users not in SMB after reboot

#3

Post by ms49434 » 30 Jan 2019 23:50

liam wrote:
30 Jan 2019 19:37
Hi

My NAS is running 11.2.0.4 - Omnius (revision 6400)

I have 2 users who have SMB shares that they need to authenticate too. After I turned off AFP and went fully to SMB for their Time Machine targets I noticed that they were unable to connect to their SMB shares after a reboot. I can ssh in and do an 'smbpassword -a username' for each of them, and then it's all OK until the next reboot.

How do I get the smb user config to persist across reboots? I can't find anywhere in the web GUI to do the equivalent of the smbpassword command, and the change in the shell isn't persisted.

Thank you
Cheers, Liam
Create your users in Access > Users & Groups > Users
access_users.png
Set SMB/CIFS authentication to Local User
services_samba.png
You do not have the required permissions to view the files attached to this post.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

liam
NewUser
NewUser
Posts: 6
Joined: 10 Jul 2014 16:20
Status: Offline

Re: Users not in SMB after reboot

#4

Post by liam » 31 Jan 2019 18:37

ms49434 wrote:
30 Jan 2019 23:50
Create your users in Access > Users & Groups > Users
access_users.png
Set SMB/CIFS authentication to Local User
services_samba.png
Thank you. My users were created in Access > Users & Groups > Users and SMB Auth is set to Local user however they are not in SMB after a reboot, and the only way I can make them work after a reboot is to ssh in and run smbpassword -a.

Cheers, Liam
  • ProLiant MicroServer Gen8
    11.2.0.4 - Omnius (revision 6400)
    Intel(R) Celeron(R) CPU G1610T @ 2.30GHz
    16GB Memory
    Boot - USB flash drive
    4 x Hitachi 2TB drives in a 7.28TB ZFS pool

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4940
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Users not in SMB after reboot

#5

Post by raulfg3 » 31 Jan 2019 21:35

are you sure that NOT run live version?.

Post a screen capture to be sure.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

User avatar
ms49434
Developer
Developer
Posts: 746
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Users not in SMB after reboot

#6

Post by ms49434 » 31 Jan 2019 21:57

liam wrote:
31 Jan 2019 18:37
ms49434 wrote:
30 Jan 2019 23:50
Create your users in Access > Users & Groups > Users
access_users.png
Set SMB/CIFS authentication to Local User
services_samba.png
Thank you. My users were created in Access > Users & Groups > Users and SMB Auth is set to Local user however they are not in SMB after a reboot, and the only way I can make them work after a reboot is to ssh in and run smbpassword -a.

Cheers, Liam
  • The GUI script under Access > Users & Groups > Users (access_users.php) writes to config.xml into <access><user>.
  • The rc script /etc/rc.d/passwd creates /var/etc/private/passdb.tdb file based on the information found in config.xml under <access><user>.
  • The rc script /etc/rc.d/samba creates /var/etc/smb4.conf with the information defined in Services > CIFS/SMB > Settings and Services > CIFS/SMB > Shares and also sets the password backend to tdbsam(smbpasswd to store user information is NOT used):

    smb passwd file = /var/etc/private/smbpasswd
    private dir = /var/etc/private
    passdb backend = tdbsam
pdbedit -L -v returns

Code: Select all

xigmanas: etc# pdbedit -L -v
---------------
Unix username:        7of9
NT username:          
Account Flags:        [U          ]
User SID:             S-1-5-21-782829325-2533275706-4084584263-1000
Primary Group SID:    S-1-5-21-782829325-2533275706-4084584263-513
Full Name:            Jeri Ryan
Home Directory:       \\xigmanas\7of9
HomeDir Drive:        
Logon Script:         
Profile Path:         \\xigmanas\7of9\profile
Domain:               XIGMANAS
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:    Thu, 31 Jan 2019 00:27:57 CET
Password can change:  Thu, 31 Jan 2019 00:27:57 CET
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

liam
NewUser
NewUser
Posts: 6
Joined: 10 Jul 2014 16:20
Status: Offline

Re: Users not in SMB after reboot

#7

Post by liam » 01 Feb 2019 23:04

My apologies if this shows up twice.

I much appreciate all the help, especially the pdbedit command. I tested with a new user, then deleted and recreated one of my users and their share. Turns out that back ni 2015 or so having UIDs in the 500s worked just fine, but sometime since then there is code that breaks things if you have a UID below 500. Creating a new user (UID 1000) produced the same lines in config.xml as my original users had. Deleting and recreating a user and the share didn't make it work, so I changed the UID in config.xml to 1xxx and it finally showed up in pdbedit. Final proof was just editing the config.xml for a user with a 5xx UID to change the UID to 1xxx without making any other changes, and rebooting. The system came up with the legacy user showing to pdbedit and their shares working.

Again, thanks for the pointers!
Cheers, Liam
  • ProLiant MicroServer Gen8
    11.2.0.4 - Omnius (revision 6400)
    Intel(R) Celeron(R) CPU G1610T @ 2.30GHz
    16GB Memory
    Boot - USB flash drive
    4 x Hitachi 2TB drives in a 7.28TB ZFS pool

Post Reply

Return to “CIFS/SMB (Samba)”