Samba share without AD/Domain or user/passwords

sharedfolders

(anon38877412) #1

NethServer Version: 7
Module: Samba

I need to add a completely username and password free share to samba without a AD/Domain setup for everyone to share on the network if possible and not sure how, i have tried some options by editing smb.conf with setting as in my Open Media Vault that are working there but with no luck on NS.

Any one done this on NS before


(Markus Neuberger) #2

You may setup a shared folder with guest access, you only need “File Server” from Software center in this case.

If Guest access is enabled, any provided authentication credentials are considered valid.
If an LDAP account provider is selected or there is no account provider at all, any access to shared folders is considered as Guest access so that everyone is allowed to read and write its content.

http://docs.nethserver.org/en/v7/shared_folder.html


(Stefano Zamboni) #3

I add: don’t edit your conf files directly


(anon38877412) #4

i thought as much, hmmm… i will remove the app and reinstall it something has gone a miss and all i was getting was error messages from windows saying “you dont have permission” etc


(anon38877412) #5

nope still get the below

you need permission to perform this action

:face_with_raised_eyebrow:

and now getting

Task completed with errors

S20nethserver-ibays-set-permissions #1 (exit status 256)

when saving setting for the share


(Michael Träumner) #6

This is correct, nethserver is built on a template system, here is the doc for the templatesystem:

http://docs.nethserver.org/projects/nethserver-devel/en/v7/templates.html

Did you change back the smb.conf?


(Markus Neuberger) #7

Did you install AD?

Shared folders without AD look like this:

As @Stefano_Zamboni mentioned, don’t edit config files directly because NethServer uses a template system that writes the config files so manual changes may be overwritten or lead to errors:

http://docs.nethserver.org/projects/nethserver-devel/en/v7/templates.html

You may restore the original smb.conf with

expand-template /etc/samba/smb.conf

Sometimes when playing with shares and permissions it’s advisable to restart the Windows client.


(anon38877412) #8

yes reverted all changes in smb.conf and just did expand-template /etc/samba/smb.conf to be sure

i have no AD my screen looks the same just without the NFS tab


(Michael Träumner) #9

Please have a look at the logs, perhaps you can see more.

I think the right should be:

/var/log/messages


(anon38877412) #10

Will samba follow symlinks as i have mounted a HDD on mnt and symed it under /var/lib/nethserver/ibay/VMS-01

I can access now i removed the share and re added it it works, just need a way of sysmlinking a Hdd there as i would like 1 hdd for virtual machine storage 1 for general data and 1 for backups.

logs only had errors from when i did install the AD that is now removed

[2018/05/22 18:11:03.299105, 0] …/source3/auth/auth_domain.c:226(domain_client_validate)
domain_client_validate: unable to validate password for user Games in domain GAMES-PC to Domain controller NSDC-site.AD.site.DYNDNS.ORG. Error was NT_STATUS_NO_SUCH_USER.
[2018/05/22 18:44:29.710991, 0] …/source3/auth/auth_domain.c:226(domain_client_validate)
domain_client_validate: unable to validate password for user Games in domain GAMES-PC to Domain controller NSDC-site.AD.site.DYNDNS.ORG. Error was NT_STATUS_NO_SUCH_USER.


(Rob Bosch) #11

Are there still any permissions on filssystem level? (ls -l for the share directory)


(anon38877412) #12

Hi rob,

Yes there are what should they be?

drwxrwsrwx 2 root root 4096 May 22 21:04 VMS-01
drwxr-xr-x 2 root root 4096 May 22 12:28 VMS-02
drwxr-xr-x 2 root root 4096 May 22 12:32 VMS-Backup

:thinking: this will teach me not to work 3 day without sleep

This is the problem when i mount the HDD the permissions change under /var/lib/nethserver/ibay/VMS-01

drwxr-sr-x 5 root root 4096 May 22 13:01 VMS-01
drwxr-xr-x 2 root root 4096 May 22 12:28 VMS-02
drwxr-xr-x 2 root root 4096 May 22 12:32 VMS-Backup


(Markus Neuberger) #13
[root@server2 ~]# ls -l /var/lib/nethserver/ibay/
total 0
drwxrwsr-x 2 root domain admins@domain.local 6 May 20 03:03 test
drwxrwsrwx 2 root domain users@domain.local  6 May 23 01:44 test2

(anon38877412) #14

Thanks Markus,

Now looks like below need to change the 5 to a 2 and that should do it, not sure how though.

drwxrwsrwx 5 root root 4096 May 22 13:01 VMS-01
drwxr-xr-x 2 root root 4096 May 22 12:28 VMS-02
drwxr-xr-x 2 root root 4096 May 22 12:32 VMS-Backup

Edit: can now access with read/wright even with the 5 in place, change the permissions on the others as well.

drwxrwsrwx 5 root root 4096 May 22 13:01 VMS-01
drwxrwsrwx 2 root root 4096 May 22 12:28 VMS-02
drwxrwsrwx 2 root root 4096 May 22 12:32 VMS-Backup


(Markus Neuberger) #15

No, this is just the number of links:

http://infohost.nmt.edu/tcc/help/unix/ls-l.html

What about creating a new share from Web UI or change one? Then the correct rights/owner should be set…

Set rights/owner with chmod/chown:


(anon38877412) #16

Thank you Markus,

That was a good read and explained the difference between chmod, chown very well better then others have explained them to me in the past.

Checking users and permissions is something i should do more as it gets me into trouble and i start looking at other things as issues, lol the idiot that i am. :crazy_face:


(Rob Bosch) #17

A post was split to a new topic: Install Kimchi on NethServer