Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: remus on April 11, 2011, 09:37:45 AM
-
Hi all,
Relearning Samba using this Guide.
http://www.samba.org/samba/docs/man/Samba-Guide/simple.html
Heres the steps i've followed
root# mkdir /plans
root# chmod 755 /plans
/usr/local/etc/samba/smb.conf
# Global Parameters
[global]
workgroup = MIDEARTH
security = SHARE
[Plans]
path = /plans
read only = Yes
guest ok = Yes
Verify that the /etc/hosts file contains the following entry:
192.168.1.1 box
root# smbclient -L localhost -U%
this command works fine, however
root# smbclient -L server -Uroot%password
this command gives the following error
Server requested LANMAN password (share-level security) but 'client lanman auth' is disabled
I get the same error if I preceed the command with sudo
I found a solution here:
http://forums.linuxmint.com/viewtopic.php?f=90&t=35620&start=0
had to add
client lanman auth = Yes
lanman auth = Yes
to the [global] section.
Just thought i'd post the situation, and its solution.
Sorry but I don't know the cause.
-
Hi remus
Here is a copy of the smb.conf file for my file server if it helps.
http://forum.tinycorelinux.net/index.php?topic=8871.msg48077#msg48077
-
Hi rich,
I had a look at your post and made the following changes.
added a user called nobody with no password
altered my /usr/local/etc/samba/smb.conf file so its now:
[global]
workgroup = MSHOME
security = share
client lanman auth = Yes
lanman auth = yes
guest account = nobody
[plans]
path = /home/tc/plans
available = yes
force create mode = 0777
force directory mode = 0777
read only = no
guest ok = yes
use sendfile = yes
I can open the plans share from windows, but can not create a file or folder within it, error is
Unable to create the folder 'New Folder'
Access is denied
-
Ok, i've found the problem.
The official samba tutorial I am following from:
http://www.samba.org/samba/docs/man/Samba-Guide/simple.html#id2550946
Starts off by directing to create a folder called plans and assigning some permissions
root# mkdir /plans
root# chmod 755 /plans
If I change that to chmod 777 /plans
It works great !!!
I can access the share without a username and password.
Goes to show, a little knowledge can be dangerous :)
-
I was thinking about the permissions on the folder and I am confused.
I created plans the folder with the tc user.
Is that why the permissions have to be set to 777, because guest account is set to the nobody user, and the nobody user did not create the folder ?
-
Hi remus
Basically the last 7 gives read, write, and execute rights for that folder to everyone, however, it does
not automatically extend to the files in that folder. That means you open the folder to everyone and
can restrict access on a file by file basis if you want to. The three 7's from left to right refer to owner,
group, and anyone. The 7 comes from adding up 4 + 2 + 1 which have the following meanings
4=Read Access
2=Write Access
1=Execute Rights
So changing a 7 to a 4 would make that file or folder read only for the owner, group or user depending
on which 7 you changed. If you want a file to be Executable you must also enable Read Access. That's
a very basic explanation of permissions, google if you want more advanced techniques.
-
thanks for the explanation Rich.
I've got my head around it now.
I've set nobody as the owner of the shared folder
sudo chown nobody public
And all the pieces fell into place.
-
does anyone know if a default install of samba on tinycore linux keeps log files ?
Heres my current /usr/local/etc/samba/smb.conf file
[global]
workgroup = MSHOME
security = share
client lanman auth = Yes
lanman auth = yes
guest account = nobody
[public]
path = /home/tc/public
read only = no
guest ok = yes
[pdf]
path = /home/tc/pdf
read only = no
guest ok = yes
What i've done so far.
sudo find / -name smbd.log
and
sudo find / -iname smbd.log
I will of course start reading the samba docs regarding setting up my own log dir, I was just wondering if its not included by default.
-
Hi remus
Add this to the global section of your conf file
log file=/usr/local/samba/var/smbd.log
# File size in Kb
max log size=50
Then restart Samba like this
sudo /usr/local/etc/init.d/samba restart
-
Thanks for the input rich,
not sure if this is unexpected, I did have to create the var folder first with
sudo mkdir /usr/local/etc/samba/var
I can now use one terminal window to monitor the log in real time with
tail -f /usr/local/etc/samba/var/smbd.log
While testing connection commands in a second terminal window with the smbclient command :)
-
Hi remus
Sorry, I thought that Samba would create the directory. Thanks for posting the correction.
-
I thought samba would create the folder as well, I had been experimenting with the
sudo smb -l /usr/local/etc/samba/var
command