Samba / cifs users not added

Status
Not open for further replies.

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
Currently i have a strange problem, i created several users via the webinterface.
Some of the accounts are able to login and some not.
After some start stop i logged in via ssh and tried to set passwords for the not working users but samba told the users didn't exist. So i added them by smbpasswd -a username and after that the users were able to access cifs shares. But after restarting the server some users seems to be missing again.

Using Freenas
FreeNAS-9.1.1-RELEASE-x86 (a752d35)


Is this a known bug or are there any hints?

Greetings Marcus
 
D

dlavigne

Guest
Any pattern to the missing users? e.g. space or symbols in name, more characters than the names that work, something like that?
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
Not really users like "ds" "hagen" "glinski" nothing special.
And i verified after stopping starting cifs via gui users missing again
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
AFAIK it is based on your FreeNAS config. That is why when you create users from the CLI and reboot they disappear. You MUST create the users from the WebGUI if you want them to be persistent. Now why they aren't working when you create them is a different story. I know it "works for me" so I really don't know what to say.

Honestly, I'm thinking user error(no offense), but there's so many ways to be making a mistake I don't even know where to begin to help you troubleshoot the problem.

There also could be something more nefarious going on. You're using x86 version. How much RAM do you have? Are you using ZFS?
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
I haven't created the users via CLI i created them via gui.
I just found out via CLI that they weren't listed in samba (smbpasswd said user does not exist)

System has 4GB RAM and yes I'm using ZFS
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
But then you created them with smbpasswd -a username, right? That's why they don't stick around for reboot.

What needs to be figured out is why when you create a user in the WebGUI its not creating the account. That's not normal.

I will say that 4GB of RAM with ZFS can cause all sorts of issues with services not properly operating and random kernel panics in some cases. The FreeNAS manual says 8GB minimum as that seems to be the minimum RAM to prevent random errors. Not sure if your issues are related to RAM not being allocatable to your services, but I'd make it a priority to upgrade to 8GB minimum with 64bit FreeNAS.

Of course, I'm betting you're about to tell me you can't because your hardware doesn't support it. And that's also why we have a comment that you should use UFS or consider a different product until you can afford the proper hardware.

Not saying the low RAM is your issue, but it is something to consider.
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
I'll change the RAM to 8 GIG later and switch to 64Bit, currently users are on the system.
BTW currently 2GB RAM is free on the system, so it shouldn't be an issue this far
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yeah, that's not true at all. Especially if you are using ZFS. "Free" doesn't really mean "free".
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
Here is the memory graph
mem.png
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
I just created the account in Samba with smbpasswd -a cause else it wasn't created
Before i logged in with the user using ssh (working)
than i tried smbpasswd as the user wich resulted in an Error
Code:
Connecting to 127.0.0.1 at port 445
Doing spnego session setup (blob length=58)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=NONE
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8235
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088235
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088235
rpc_client/cli_pipe.c:470: RPC fault code DCERPC_NCA_S_OP_RNG_ERROR received from host 127.0.0.1!
machine 127.0.0.1 rejected the password change: Error was : NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE.

after that i tried to change password as root User with
smbpasswd Username which resulted in couldn't change Password user doesn't exist
Code:
smbpasswd glinski2
New SMB password:
Retype new SMB password:
Failed to find entry for user glinski2.

the last try was than
smbpasswd -a Username
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
But, before you used smbpasswd you tried to use the webgui, right? And despite it being in the WebGUI the account wasn't created, right?

Yeah, ZFS's caching system is always allocated as "Free" space. What that graph tells me is that you definitely don't have more than 2.5GB assigned to zfs. It does have lower limits and when you hit that floor your programs start pooping all over themselves because you have an out of memory condition.
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
Yes used webgui also tried to set new passwd in webgui.
The Account was created as local user but not as cifs user
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Yeah, ZFS's caching system is always allocated as "Free" space.
ZFS cache (ARC) is part of the Wired memory. Free is, well, free :). However, in this case (less than 4 GB) ARC is completely disabled.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
freak. i forgot. prefetch is disabled. Keeps throwing me off because FreeNAS is the only OS that seems to do that. I even know better!
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
64 bit is currently not possible for me, cause i using proxmox with kvm as hypervisor and 64 FreeNas won't boot.
And yes i know prefered is dedicated Server, but it won't change in near future.

Could anyone tell me wich script or how the samba / cifs users are created?

In meantime i tried deleting a user which won't work and recreated him with same user id, same problem as before he's not a cifs user
After that i created a unique new user and this one was working

Don't know what i should try next
 

fonts

Cadet
Joined
May 9, 2015
Messages
3
PHPExpert have you managed to fix your issue ?
i am having the exact same problem
 

PHPExpert

Dabbler
Joined
Dec 18, 2013
Messages
10
I solved my Problem, i've changed uid and gid after i've added the Users, somehow the was a mixup in the sqlite database with these things.
I've downloaded a Backup and fixed the sqlite database entries
 

fonts

Cadet
Joined
May 9, 2015
Messages
3
would you be able to provide a few steps on how you fixed it so i can fix mine ?
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
I had the exact same problem (or very similar) I didn't have a chance to really dig down and diagnose the issue. But basically after the latest update some users on the CIFS shares suddenly didn't have access any more. When I looked on the security tab on the shares in windows explorer I would just get the long ID on about half of my users. Some of them I could just add back in but one I had to completely remove the user from Freenas then recreate the account.

I think I am just running out of ram I have 12 GB of RAM assigned to the Freenas VM with about 6 TB of storage. I think that is fine on its own but I am also running about 5 Jails on top of that. So that might be pushing it. I might do some ram chaining and see if I can bring Freenas up to 16GB

If I get a moment I can post my logs if anyone wants to add them to the bug report.
 
Status
Not open for further replies.
Top