New users/groups not avalible to SMB shares

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
I am running FreeNAS 11.2-U3.
I am just using the local Freenas users and groups database no fancy AD or LDAP or anything like that. When I add a new user or a group on FreeNAS, that user does not show up when I go over to the SMB share under windows and try to add the user in the security tab.

Also when I go to the SMB shares under windows and try to search for users under the advanced menu some of the users and group that are returned doesn't exist on my current FreeNAS. However they did exist on my old freeNAS server that this freenas box has replaced.

This is a new fresh install of FreeNAS. However the storage volumes are not new and they were imported into this new version. So maybe somehow the old users got stored on the storage volumes somehow?
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
Did you try stopping/starting the SMB service? Try rebooting?

Does 'net usersidlist' show your new users?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@Catsrules Did you save the original FreeNAS configuration and then re-load it on the new install?
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
Did you try stopping/starting the SMB service? Try rebooting?

Does 'net usersidlist' show your new users?

@seanm Yes I have tried stopping/starting SMB as well as rebooting FreeNAS

usersidlist is showing the old users not the new users.

@Catsrules Did you save the original FreeNAS configuration and then re-load it on the new install?

@KrisBee No I didn't save the original FreeNAS config. This was a clean install from scratch. The only thing I can think of is some how my user data was saved on my storage drives. FreeNAS was a clean install but I imported my storage that existed on my old FreeNAS server. Is is posible that user accounts could have been stored on my main storage drives and not the FreeNAS OS drive?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
AFAIU, you must restore the FreeNAS config whenever FreeNAS is freshly installed. By not doing this, you have data on your pool associated with old accounts which Windows can still detect, but FreeNAS cannot as the related account config has been lost.

If your old FreeNAS install was configured to store the "system dataset" on your main pool instead of "freenas-boot", if may be possible to find and restore a valid previous config as described in this thread: https://www.ixsystems.com/community/threads/where-is-configuration-file-located.70198/
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
AFAIU, you must restore the FreeNAS config whenever FreeNAS is freshly installed. By not doing this, you have data on your pool associated with old accounts which Windows can still detect, but FreeNAS cannot as the related account config has been lost.

If your old FreeNAS install was configured to store the "system dataset" on your main pool instead of "freenas-boot", if may be possible to find and restore a valid previous config as described in this thread: https://www.ixsystems.com/community/threads/where-is-configuration-file-located.70198/

@KrisBee Hmm, I have searched my main pool and I did find a .system folder, unfortunately that last system dataset I found was from Jan 2017. Not sure why I don't have a newer one but I am not sure if I want to restore a backup that old. Do you know of a way I can just clear out all account data on my pools and start over?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Are you sure you found nothing? In this example the mount command shows which directory to check for a possible config db file, it shows up as 20190115.db

Code:
root@freenas:/ # mount
freenas-boot/ROOT/11.1-U7 on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
tmpfs on /etc (tmpfs, local)
tmpfs on /mnt (tmpfs, local)
tmpfs on /var (tmpfs, local)
freenas-boot/grub on /boot/grub (zfs, local, noatime, nfsv4acls)
fdescfs on /dev/fd (fdescfs)
NasPool on /mnt/NasPool (zfs, local, nfsv4acls)
NasPool/home on /mnt/NasPool/home (zfs, local, nfsv4acls)
NasPool/home/chris on /mnt/NasPool/home/chris (zfs, local, nfsv4acls)
NasPool/.system on /var/db/system (zfs, local, nfsv4acls)
NasPool/.system/cores on /var/db/system/cores (zfs, local, nfsv4acls)
NasPool/.system/samba4 on /var/db/system/samba4 (zfs, local, nfsv4acls)
NasPool/.system/syslog-a421eaccddb44c098d96b72146b5211d on /var/db/system/syslog-a421eaccddb44c098d96b72146b5211d (zfs, local, nfsv4acls)
NasPool/.system/rrd-a421eaccddb44c098d96b72146b5211d on /var/db/system/rrd-a421eaccddb44c098d96b72146b5211d (zfs, local, nfsv4acls)
NasPool/.system/configs-a421eaccddb44c098d96b72146b5211d on /var/db/system/configs-a421eaccddb44c098d96b72146b5211d (zfs, local, nfsv4acls)
root@freenas:/ # cd /var/db/system/configs-a421eaccddb44c098d96b72146b5211d;ls -lR
total 1
drwxr-xr-x  2 root  wheel  3 Jan 15 11:45 FreeNAS-11.1-U6 (caffd76fa)

./FreeNAS-11.1-U6 (caffd76fa):
total 101
-rw-r-----  1 root  wheel  913408 Jan 15 11:45 20190115.db
root@freenas:/var/db/system/configs-a421eaccddb44c098d96b72146b5211d #


Another possibility is if you kept the old install on a USB mem stick, rather than simply overwriting it? You could extract a previous valid config from that.

Otherwise, that you're left with the option to "rest configuration to default" .... under system > general. I've never had to do this myself, but AFIAK it will force a re-boot of FreeNAS, re-set the webui, login password, interface, the ip config is lost and non-system accounts cleared. When you import your pool, all the dataset are set back to root:wheel as the owner:group and any pre-existing share definitions are lost.
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
Are you sure you found nothing? In this example the mount command shows which directory to check for a possible config db file, it shows up as 20190115.db

Ahh, ok using the mount command I did find a .system folder that is mounted to \var\db\system. Weird that the .system folder doesn't show up under my \mnt\PoolName\.system

However .system folder I had previously found was under a different poolname. (I have three pools) One has a super old .system folder (back in 2017) and the other one that I found via the mount command you showed me is the current database file that was created today. The third pool doesn't appear to have any .system folder that I can find.

However both of these .system folder I don't think I can use. :(

Another possibility is if you kept the old install on a USB mem stick, rather than simply overwriting it? You could extract a previous valid config from that.

No unfortunetly the old FreeNAS install the USB mem stick died. And I didn't have a backup of the FreeNAS OS just my data pools. I figure I could just rebuilt FreeNAS in a few hours so I never bothered to back it up.

Otherwise, that you're left with the option to "rest configuration to default" .... under system > general. I've never had to do this myself, but AFIAK it will force a re-boot of FreeNAS, re-set the webui, login password, interface, the IP config is lost and non-system accounts cleared. When you import your pool, all the dataset are set back to root:wheel as the owner:group and any pre-existing share definitions are lost.

Wouldn't I run into the same problem again when I import my existing pools? Or will the rest clear out any permissions on my pools?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Your situation is complicated by having multiple pools. I believe the FreeNAS webui only allows a single pool to be selected for the "system dataset" which might explain your search results.

To answer your question, I'd expect a "reset" to change all datasets back to root:wheel permissions, but I've not had a chance to test this thoroughly myself, nor the impact on any pre-existing VMs or jails. In any case, a "reset" that didn't do this wouldn't be of much use.
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
Your situation is complicated by having multiple pools. I believe the FreeNAS webui only allows a single pool to be selected for the "system dataset" which might explain your search results.

To answer your question, I'd expect a "reset" to change all datasets back to root:wheel permissions, but I've not had a chance to test this thoroughly myself, nor the impact on any pre-existing VMs or jails. In any case, a "reset" that didn't do this wouldn't be of much use.


Hmm well I am thinking of just backup my current config and do a reset and see what happens.
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
@KrisBee Oh I might have figured it out, I Export/Disconnected each pool there was an option Delete configuration of shares. I did that to each of my pools then did another reset.
So far everything it working, I have rebooted a few times to make sure so far so good.

Edit
Well still working flawlessly. I think I am functional agian. Thanks for your help.
 
Last edited:
Top