[SOLVED] Samba password issues

A few days ago I received my Turris Omnia. And because I wanted a network drive for file sharing between my PC’s, I installed a 250GB SSD.
I’m completely new to this Linux based environment. Also started experimenting with Pi’s recently. And I already noticed there are command differences between the 2 systems.

After a lot of research on the on the internet and this forum I finally got the SSD to show up on my Win7 machine.

With SSH I’m always logged in as ‘root’. So, I changed the samba password for ‘root’ with:

smbpasswd -a root

and restarted samba.
But when I want to open the folder and log in, it always get denied.
What am I doing wrong? I can’t find the solution anywhere or I’m overseeing it.

Here are 2 screen shots of the SSD mounted to Omnia.

www.walagata.com/w/nightwalker/Turrisomnia/mountedfilesystems.jpg

www.walagata.com/w/nightwalker/Turrisomnia/networkshares.jpg

There is Turris manual available for this. Currently in Czech version only, but the google translated version should help you as well: https://translate.google.com/translate?hl=cs&sl=cs&tl=en&u=https%3A%2F%2Fwww.turris.cz%2Fdoc%2Fcs%2Fhowto%2Fnas&sandbox=1

It’s a great help, but there is still something wrong.
In my case it is a SSD that I formatted ext4. So I had to change some things because I don’t need the hd-idle function and it is not NTFS.
So, I edited the ‘nas’ file to:

 cat> << EOF us
 #! / Bin / sh /etc/rc.common

 START = 99
 STOP = 99

 start () {
	ext4 / dev / sda1 / mnt / nas
 }

 stop () {
	 umount / mnt / nas
	 }
 EOF

After this the ‘nas’ file ends up like this with ‘ls -l’ and it is the only one in white. All other files are green.

-rw-r--r--    1 root     root           189 Nov 26 00:55 nas

‘Add File rights to run’ and the enable service command both give permission denied.
Should I have skipped the “Setting up a NAS NTFS disk” section completely because it is not a NTFS disk, or do I have to modify the file an other way?

But now I can open the folder (that shows the SSD content) on my win7 machine and see the lost+found folder. But I can not make a folder or move files to it.
Is this because I didn’t don the “Advanced sharing settings” section yet? Because I got the permission denied in the previous section, the whole service doesn’t run yet.

I was a bit busy lately so didn’t had the time to work on my network SSD again. But I started with this again today.
First I’ve read the manual again to understand it better because google.translate makes a mess of some translations. But now I’ve done the instructions again, skipping the NTFS instructions because my SSD is ext4, and got it right I think.

But now I’m stuck on adding a user to samba. Like I said I’m new to this kind of programming, so I have a problem adding a user. I used the command like in the manual

useradd --home-dir / var --gid 65534 --no-create-home --shell / bin / false novyuzivatel

changed the user name and directory to my configuration but I don’t understand the rest of the command.
What does the command have to be to add a user?

Edit:
I found the error. Like I mentioned that google.translate messes up the translations, it also messes up the code strings.
Google.translate added spaces to the command line. I just had a look at the manual in original Czech and saw the command line displayed differently:

useradd --home-dir /var --gid 65534 --no-create-home --shell /bin/false novyuzivatel

This time it worked.
I added a user, gave it a password and filled in the user name at “network shares”. Unchecked “allow guests”. “Read only” is also unchecked. Saved all settings and rebooted Omnia.

Now I can see the drive on multiple pc’s (win7, XP). After entering the user name and password I can see the content of the drive. Only a Lost+found folder.
But I’m not allowed to write to the drive. I tried to create a folder or to copy a folder with content to it, but I have no permission to do so.
I can’t see anything wrong in my configuration. The “read only” is unchecked.
Can someone tell me what still could be wrong?

The mount does not belong to the “newuser” (that’s what novyuzivatel means) nor he has rights, as seen above. It belongs to user root and group root, other only has read rights.

Check the file permissions on the disk. If you mounted your disk as /mnt/nas then run command “ls -ld /mnt/nas” from SSH command line to check the permissions.

I checked the permissions. And, indeed, it is set for “root”.

But on the windows machines the root login details don’t work.

How can I change the permission for the user name I added?

Problem solved. After a little search on the internet I found out about the ‘chown’ command to change the read/write permission to an other user.
Directly after I used the next command in SSH,

chown <username> /mnt/TurrisSSD

I had full access to my SSD in the Omnia.

This ‘chown’ command is not described in de manual, so that’s why I overlooked it.
Thanks for noticing about the user rights. It putted me in the right direction.

1 Like

After getting used to chown, now have a look on chmod. :wink:

That’s a nice command to set all kinds of permissions per file/folder.
A nice explanation of it I found on this website:
http://ss64.com/bash/chmod.html

But for now I’m the only user of the NAS-drive. Now I can access it from all my computers. :smiley: