NAS setup for newbie [solved]

Hello,

i would like to get some answers. I am a pretty newbie.

Here what i already did.
I got omnia + NAS box perk.
I got two 3TB hdds for data.
I mount it all by using nice tutorial on youtube from CZ.NIC.

After start i opened guide on web and started with step by step.
First stuck was at point one. (you need to know file system)
Ok my drive dont have file system jet they dont have any particion jet… So how to create new particion and how to format it correctly …
I did not found any “click able” interface for it so i used google and found the way true fdisk command and mkfs.ext4 command.

After that i was able to process guide from turris web.
So i mounted drives (to one folder /mnt/nas hope its not a problem)

and run samba service by user guide. So i want all from my network to be able to acces and write to this folder.

I see folder on network but when i try to copy there any file in W10 its says you dont have permition to do that kind of action.

Anyone can tell me where and what to setup to be able to copy files there?

Thank you very much
Ondrej

Check the owner of smbd process with ps command, for example using -ef option. And then check that /mnt/nas has permissions that allow the owner of smbd process to write there, for example using ls -la /mnt/nas command. You can change the owner and permissions with chown, chgrp and chmod commands.

Thanks a lot i used this:
chmod 777 /mnt/nas
and it work!

1 Like

Hello, i have too problem with advanced access rights.

samba on turris really does not have any group to add rights over “group”.
So for access and share in samba must directory have 777 mode.
As group i used transmission for torrent client.

What i need, and can´t setup:

I need have many users, and for some users i need to have reed access to directory /mnt/Disk/Films
and for some users i need to have write access to this directory.

But for second directory /mnt/Disk/Photos/
I need rw acess for some users but for others i need hide this dir.

I create test users in system with:
useradd --home-dir /var --gid 65534 --no-create-home --shell /bin/false user1 //…etc

[global]
netbios name = Turris
display charset = UTF-8
interfaces = 127.0.0.1/8 lo 192.168.1.1/24 br-lan
server string = Turris
unix charset = UTF-8
workgroup = WORKGROUP
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
guest account = nobody
guest ok = no
invalid users = root
local master = yes
load printers = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
obey pam restrictions = yes
os level = 20
passdb backend = smbpasswd
preferred master = yes
printable = no
security = user
smb encrypt = disabled
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes

[Films]
path = /mnt/Disk/Films/
valid users = user1,user2,user3
write list = user1 / write list is deleted after restart because i can´t setup it in Luci
read only = yes
guest ok = no
create mask = 0700
directory mask = 0700

[Photos]
path = /mnt/Disk/Photos/
guest ok = no
valid users = user2,user3 // valid users are 2 and 3 but i can open this directory as user1
create mask = 0700
directory mask = 0700

Please who know how to solve this problem ? and what is reason of this.

I uninstall luci-apt of samba… and stil when i restart turis / or service samba. Configuration fail looks like before my edit. It is like created by luci script.

Hi.

Another noob here :slight_smile:

I’ve set up a raid1 array, but can’t get it to show up on a Windows machine on the network. I’ve enabled Samba, and configured the network share. Can anyone see what I’m doing wrong please?

[global]
netbios name = |Turris|
display charset = |CHARSET|
interfaces = |INTERFACES|
server string = |DESCRIPTION|
unix charset = |CHARSET|
workgroup = |WORKGROUP|
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
guest account = nobody
guest ok = no
invalid users = root
local master = yes
load printers = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
obey pam restrictions = yes
os level = 20
passdb backend = smbpasswd
preferred master = yes
printable = no
security = user
smb encrypt = disabled
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
valid users=xxx1,xxx2
writeable = yes

Thanks,

Crash

Did you specify a share?
something like this:

[example]
path = /srv/data
comment = example share
available = yes
browseable = yes
guest ok = yes
writeable = yes

you have to specify a share, else nothing can be seen.

1 Like

Thanks, I hadn’t done, but I’ve added one now. It’s still not showing on the Windows machine, unfortunately :frowning:

How do you try to access the share?
Via start -> run -> \\[TURRIS_IP_HERE]\example ?
Maybe you just cannot see it in network browser, but may it exists.

1 Like

I’ve tried typing the address into the address bar of Explorer, but it says that the device can’t be found…It’s like it isn’t visible on the network. The workgroup name is correct though. how can I check if Samba is running correctly?

I read that Windows 10 may have a problem with SMB2/3, so I tried disabling them and using SMB1 - no luck, no difference, so I’ve re-enabled smb2/3 on the windows machine now.

A bit more info that might help someone work out what’s going on:

If I remove the workgroup from the Samba configuration, my Windows PC appears on the network when I search the netowork for computers. If I add the workgroup back into the Samba config, the Windows PC disappears from the network.

I experienced this problem with windows 10 too. When I try to pxe boot windows 10, the samba, which is need for run setup.exe was not working.
I solve it by following setting:
In file /etc/samba/smb.conf.template delete line with SMB2/3 (ehh I dont remeber what was there as default) and put there:
min protocol = NT1
max protocol = SMB3

You can also have problem that samba is not running.
Please check that samba is running with following command:
/etc/init.d/samba enabled && echo SAMBA *on* || echo SAMBA *off*

1 Like

This command will only show you if it’s enabled to start at boot. ps | grep -i smb will be better. (smb or samba, you have to try, I am not running smb on TO)

1 Like

You are right, but usually when you have *off* there then its possible that service is not enabled and probably not running.

Thanks guys - I had noticed that the protocol was limited to smb2, but didn’t know enough about it (yet!) to risk fiddling about with it. I’ll try this change over the weekend and let you know how I get on.

I have enabled Samba to start automatically, and have manually restarted it a few times, but to no avail, so hopefully this change will help.

Right, it’s been a bit of a journey, but I finally got my Samba share visible and working on Windows 10.

My problems mainly seemed to stem from my inexperience (as is often the case!).

When I edited the config file manually, I put in pipe symbol around the NetBIOS name, as that was how the template file appeared. This stopped it showing up on the Windows network and made it impossible to connect to as (I assume) pipe symbols are illegal in a NetBIOS name.

Once I realised this and removed the pipe symbols, the share became visible to Windows 10. I still couldn’t connect though.

Next, I removed the config file section that I’d added manually for the share, as the Omnia LUCI interface adds this for you.

I still couldn’t connect. Whatever I tried, I was told that my password was wrong.

Digging around on the internet, I found that you have to set up a Samba password separately from your Unix user password (another ‘Duh!’ moment).

I added a password using ‘smbpasswd -a’…lo and behold, I can connect. At last.

LOL

I’ve now taken my config template right back to basics, and everything is working just fine.

Thanks for all of your help with this. I hope that my experience is helpful to any other noobs out there who may be struggling.

For my next trick, I intend to try setting up a VPN for connecting via the internet. Wish me luck! :slight_smile:

2 Likes

Thanks @Crash_Dark for detailing the solution. I had the same problem, and the cause was that I’d not set the separate samba password. :slight_smile:

1 Like