SOLVED CIFS share ask for usr/pw although guest access is on

Status
Not open for further replies.

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Hi!

As the title suggests, I'm having problems with my CIFS shares.
It's the same problem for the 2 folders i have shared via CIFS. The confusing thing is, I set the server up a couple of days ago and the CIFS share have been working fine all the time. After moving all data i wanted to the CIFS shares I started looking at running the Crashplan plugin. I got that to work as well, but wanted to see if it was possible to connect a USB disk to the server and choose that as a backup destination in Crashplan. Something I later learned is not possible. Anyhow, I connected the USB drive and it appeared under FreeNAS storage section. I then setup a volume for it.... and this is where my problems begin.

At this point I lost access to the CIFS shares. I had them mounted in Win7 Pro, but got different error messages when trying to reach them. I also tried to browse the folders via server ip, but they didn't come up.
I then restarted the server, but it didn't boot. So after a couple of minutes I had to make a hard reset and unplug the USB disk. The server then booted normally, however I could still not access the CIFS shares. It suddenly asked for usr/pw. I checked the settings for the share, and guest access was enabled - same as before. As far as I could tell nothing had changed for either the volume nore the share, but it behaved differently.
I tried to disable guest access and restart the CIFS service - it asked for usr/pw.
I tried to enable guest access and restart the CIFS service- it asked for usr/pw.
I tried to provide a usr/pw - I could access the folder.

I have gone through all settings for the volume, the CIFS share, and general CIFS service settings with no luck.
I've restarted the service aswell as the server several times but the problem remains.
I also tried to follow this guide ( https://forums.freenas.org/index.php?threads/cifs-windows-sharing-guide.20948/ ), but I get stuck on step 4 where I am supposed to set Authentication Model = Local User and Guest Account = Guest. I can not find any setting for Authentication Model and when i set the Guest account to Guest, the CIFS service won't start any more. I get an error message saying the service could not be started.

Any ideas what could be wrong?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Post contents of /etc/local/smb4.conf. Did you disable password authentication for your guest user? If so, that probably is contributing to your problems.

BTW, that guide is outdated and following it can end up breaking things.
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Hi!, and thanks for the quick reply.

I really hope nothing is broken. I just set this up and moved all the data to FreeNAS after a hdw crash on a ReadyNAS. I just got Crashplan working and have not had time to make backups of my data yet :/
Anywho, I start the Shell prompt from FreeNAS web gui but it seems I have no etc folder there. Should there be or am I looking in the wrong place?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hi!, and thanks for the quick reply.

I really hope nothing is broken. I just set this up and moved all the data to FreeNAS after a hdw crash on a ReadyNAS. I just got Crashplan working and have not had time to make backups of my data yet :/
Anywho, I start the Shell prompt from FreeNAS web gui but it seems I have no etc folder there. Should there be or am I looking in the wrong place?

Nothing is broken in that way. The guide just contains old advice that makes your CIFS shares stop working. Simpler procedure = click "System -> "Advanced" -> "Save Debug". It will take a while to complete. Post the resulting file here.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
File attached as requested.

Thanks.

Short answer, I recommend the following:
1) In webgui, create user "guest"
2) Go to "services" -> "CIFS" and set "Guest Account" to "guest"
3) Using "file explorer" on a Windows computer, navigate to "\\gimli" or "\\192.168.1.5", and authenticate to your share as "Neth"
4) Right-click on your share "Shared", click on "properties" -> "security".
5) Select the "everyone" entry and click "edit".
6) Check the box marked "modify", then "apply", "OK".

Finally fix permissions on "Backup" as follows:
1) In webgui click "Storage" -> "Volumes" , and expand "/mnt/MyRaidVolume/Backup"
2) Click "change permissions"
3) Change owner of /mnt/MyRaidVolume to "Guest" and check the recursive box.

Just to be sure all setting changes are applied, click "Services" -> "Control Services", and toggle "CIFS" off and on.

Shorter answer,
Your guest user is "nobody", which has no access to your CIFS shares.
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
I created a user Guest earlier, when I followed the guide which I linked in the first post. However, as i set that account as Guest account CIFS service can no longer start.
Is there something wrong in the procedure in which the Guest account in that guide is created?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I created a user Guest earlier, when I followed the guide which I linked in the first post. However, as i set that account as Guest account CIFS service can no longer start.
Is there something wrong in the procedure in which the Guest account in that guide is created?
Yes, the guide tells you to "disable password logins" for the guest account. This is wrong. Uncheck that box, set a password, and try again.
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
I set a password on the user and tried to enable CIFS, service could not be started.
Set default guest acc to "nobody" and enabled CIFS, service could be started.
Disabled CIFS and set default guest acc to "Guest" and enabled CIFS, service could not be started.

Guest acc cfg:
Username: Guest
Primary Group: Guest
Home Dir: /nonexistent
Shell: csh
Full Name: Samba Guest

E-mail:
Password: ******
Disable Password login: unchecked
Lock user: unchecked
Permit sudo: unchecked

Microsoft acc: unchecked
SSH Public key: unchecked
Home Dir Mode:
Owner: RWE
Group: R E
Other: R E​
Aux Grps: none selected
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I set a password on the user and tried to enable CIFS, service could not be started.
Set default guest acc to "nobody" and enabled CIFS, service could be started.
Disabled CIFS and set default guest acc to "Guest" and enabled CIFS, service could not be started.

Guest acc cfg:
Username: Guest
Primary Group: Guest
Home Dir: /nonexistent
Shell: csh
Full Name: Samba Guest

E-mail:
Password: ******
Disable Password login: unchecked
Lock user: unchecked
Permit sudo: unchecked

Microsoft acc: unchecked
SSH Public key: unchecked
Home Dir Mode:
Owner: RWE
Group: R E
Other: R E​
Aux Grps: none selected
1) Try to start CIFS.
2) Open shell and type "tail /var/log/messages"
3) post output here.
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Sorry for the late reply, taking care of 3 kids and a wife who is ill.

Anywho, see below:
Code:
[root@Gimli ~]# tail /var/log/messages                                        
Oct 14 20:33:09 Gimli notifier: Granted SeRestorePrivilege to GIMLI\root      
Oct 14 20:33:09 Gimli notifier: Granted SeTakeOwnershipPrivilege to GIMLI\Neth
Oct 14 20:33:09 Gimli notifier: Granted SeBackupPrivilege to GIMLI\Neth       
Oct 14 20:33:09 Gimli notifier: Granted SeRestorePrivilege to GIMLI\Neth      
Oct 14 20:33:09 Gimli notifier: Performing sanity check on Samba configuration:
OK                                                                            
Oct 14 20:33:09 Gimli notifier: Starting smbd.                                
Oct 14 20:33:09 Gimli smbd[34872]: [2015/10/14 20:33:09.672417,  0] ../source3/a
uth/auth_util.c:866(make_new_session_info_guest)                              
Oct 14 20:33:09 Gimli smbd[34872]:   make_server_info_info3 failed with NT_STATU
S_NO_SUCH_USER                                                                
Oct 14 20:33:09 Gimli smbd[34872]: [2015/10/14 20:33:09.673469,  0] ../source3/s
mbd/server.c:1433(main)                                                       
Oct 14 20:33:09 Gimli smbd[34872]:   ERROR: failed to setup guest info.
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Any more tips on this?

I tried to delete the user account Guest and recreate it via WebGUI, but I still can't enable the CIFS service with the user Guest as default test account. However if I use the account "nobody" as default guest accoount instead, CIFS can be started.

With CIFS enabled i tried to provide usr/pw to get access to one of my shared folders (named Shared). It worked, so i checked permissions for user "Everyone". User Everyone has the following permissions granted:
  • Traverse folder / execute file
  • List folder / read data
  • Read attributes
  • Read extended attributes
  • Read permissions
To me that seems like Everyone should have access to the folder without being able to provide any credentials (?).
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
okay_guy.jpg
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Ok so... I saved my config, made a clean install of FreeNAS and uploaded my config again.
Instant SUCCESS!!!

The question now is... do I even dare set the default guest acc to Guest?
As of now the default guest acc is nobody. Is there any preferred way here or should I just roll along and be happy that everything works again? :)
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Ok so... I saved my config, made a clean install of FreeNAS and uploaded my config again.
Instant SUCCESS!!!

The question now is... do I even dare set the default guest acc to Guest?
As of now the default guest acc is nobody. Is there any preferred way here or should I just roll along and be happy that everything works again? :)
If it's working with the guest account set to "nobody", then leave it that way. Just change the permissions of your "Backups" share

1) In webgui click "Storage" -> "Volumes" , and expand "/mnt/MyRaidVolume/Backup"
2) Click "change permissions"
3) Change owner of /mnt/MyRaidVolume to "nobody" and check the recursive box.
 

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Reopening this thread again.
Today when I start my computer and try to access my CIFS folder I am yet again asked for usr/pw.
I've tried rebooting the server but the problem persists.

I tried the previously suggested method, which was to set default user acc for CIFS to the previously created Guest account - but just like before the reinstallation of FreeNAS the CIFS service could not be started. So I set it back to nobody. However, I am still asked for usr/pw when trying to access both shared folders (named Shared and Backup). If I provide credentials I am able to get access.
Yesterday I also noted that when accessing Shared folder from another computer running Ubuntu, I was able to access the folder without providing any credentials but I was not able to write to the share (tried to move a file there). Got an access denied error.

This seems to very unstable. Thinking of just providing credentials and set my computer to remember them. It bugs me though that I am forced to do in a specific way based in lacking functionality.

Edit 2015-10-18 10:15 CET+1:
Applied the latest updates, still same issue.
 
Last edited:

Neth

Dabbler
Joined
Oct 8, 2015
Messages
20
Neth said:
Ok so... I saved my config, made a clean install of FreeNAS and uploaded my config again.
Instant SUCCESS!!!
I think my previous success might have been due to me providing credentials to the Shared folder before reinstallation of FreeNAS. After shutting down the computer for the night at starting it again in the morning the problem was "back".

This problem not only denies me access to my files, but it is also messing up my Crashplan backup since Crashplan can't get access to the folders. I reinstalled FreNAS again today but the problem remains, I can't get access to the CIFS shares from my Windows 7 machine. This strengthens the theory I described earlier regarding providing credentials as a way to "success".

Does anyone have any ideas how to solve this?

I've uploaded some screens of my settings which you'll see below.

Volume permissions
ZGOKWp8.png




Dataset Backup & Shared permissions
JxiNfYT.png



CIFS Shared folder settings for Backup & Shared
g4Z1eS0.png




Lastly, CIFS default guest account = nobody.


Any tips welcome. This is getting quite frustrating.
 
Status
Not open for further replies.
Top