SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was using SuSE for quite some time, and have decided to start using other distros. For my fileserver, I chose slackware on the advice of a good friend of mine, and so far I've been thrilled.
My only issue is with getting Samba configured. Currently, I can only write to the share when I am logged in as root on the remote machine, and I cannot read any sub-directories when logged in as the user. The partition I am sharing has
drwxrwxr-x 11 root users
under ls -l, and read only = no, writeable = yes, and write list = @users are all enabled in the smb.conf file, but I have tried the setup with very basic smb.conf setups and it still does not work, which leads me to believe that its not necessarily the smb.conf setup that is causing the problem. I have added the remote user on the slack box, ran smbpasswd -a, and use mount -t smbfs //Samba/documents /mnt/docs -o username=<user>,password=<password> when mounting the share. I can also write to the directory when logged in as the user on the slack machine.
I am stumped! I noticed in an old smb.conf a reference to a username map = <> line. I thought smbpasswd took care of the username mapping, is this incorrect? Thanks in advance for the advice!
use the rw, dmask and fmask args with smbmount on the remote machine.
Also, you will find SAMBA much easier to manage using Webmin on the host. Both the Webmin tools and the SAMBA SWAT tools make managing the smb.conf much easier.
Are the directories you are sharing listed as valid shares when you run testparm? Also I would suggest learning to edit the smb.conf file by hand instead of swat, in the long run you will understand a great deal more and have fewer issues, and vi is available on a lot lower end machines as an X server would not be, and swat is pretty unusable with lynx.
actually i'm not using swat, x isn't even installed on that machine and i'm comfortable using vi to edit the smb.conf file. thanks for the suggestions, i will try them at lunch!
This is a shortened version of testparm's output of my functioning smb.conf samba shares:
Load smb config files from /etc/smb.conf
Processing section "[printers]"
Processing section "[Share]"
Processing section "[Test]"
Loaded services file OK.
Press enter to see a dump of your service definitions
[Share]
path = /samba_share
writeable = Yes
[Test]
path = /samba_share/test
Here are the permisions set on the shared directory
file being the user on the slack box. Then i ran mount -t smbfs //Samba/documents /mnt/docs -o rw,username=ben,password=<>, and i am getting the same results. I also noticed on the remote machine, after i mount the share it changes the file to
drwxr-xr-x 1 root root 4096 Nov 17 12:59 docs
while when it is not mounted it is set as
drwxrwx--- 2 ben users 4096 Nov 9 21:55 docs
This is what i get when i run testparm on the slack box:
Ok i tried that...still same issue. here is my smb.conf file:
[global]
netbios name = Samba
server string = "Samba Server"
workgroup = WORKGROUP
security = user
log file = /var/log/samba.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
hosts allow = 192.168.1. 127.
# only add as much of the number as necessary to identify the computers, localho
st can be
# identified using only 127. a private network may require the first three numbe
rs in the IP
# address.
; hosts deny = ALL
; invalid users = root
valid users = file, ben, ben1
message command = /bin/sh -c 'xmessage "%f" "%m" %s; rm %s' &
interfaces = eth0
[public]
path = /docs/test/
guest ok = yes
public = yes
writeable = yes
read only = no
[ben]
path = /docs/ben/
guest ok = no
public = yes
writeable = yes
read only = no
[documents]
path = /docs
browseable = yes
guest ok = yes
writeable = yes
create mask = 777
write list = @users
public = yes
read only = no
[printers]
comment = All Printers
path = /var/spool/samba
printing = bsd
browseable = yes
read only = yes
printable = yes
guest ok = yes
yes i have been restarting samba after every change to the smb.conf file, no offense taken! I will try your suggestion when I get home this evening. Do you think it could have anything to do with the username map = option? Maybe if that is not properly setup samba cannot reference its users against the ones on the slack box?
[documents]
path = /docs
guest ok = no
read only = no
browseable = yes
write list = @users
and its doing the same thing, which leads me to believe its not the smb.conf file that is the problem. to setup samba i follwed this website: http://www.magma.ca/~meik/linux/conf...are.html#samba and i got the following error:
bash: mksmbpasswd.sh: command not found
so i just added all of the passwords manually through smbpasswd -a <userid>
i also created the lmhosts file as:
# For loopbacking.
127.0.0.1 localhost
127.0.0.1 slackware.linux slackware
# Network
192.168.1.101 Game
192.168.1.102 ben
192.168.1.104 FreeBSD
# End of hosts.
Distribution: Slackware 10 (moving from RHEL 3 WS)
Posts: 27
Rep:
bhicks
If memory serves me correctly, the default masks in samba are as follows (unless they are specified in the relevant sections):
create mask = 0600
directory mask = 0755
In respect to your [global] settings, you have only define three users with access (file, ben, ben1) but from the [documents] settings you are defining @users. Shouldn't you be defining this in reverse order (ie groups in [global] and then becoming more restrictive on the shares)? (This isn't the best way to ask the question but you should grasp what I'm asking) Questions:
1) Are only three users accessing this server?
2) Have they been added into the local users group?
3) Have you converted these user to Samba users (effectively adding them to the smbpasswd file)?
4) What version of Samba are you using?
If more than these 3 users are accessing the server, then add/change the valid user in the [global] section to @users.
Here's a copy of my smb.conf file:
~~~
# Global parameters
[global]
socket options = SO_KEEPALIVE TCP_NODELAY
admin users = bhayes, jgilbert
wins server = CONTDC13
domain master = No
interfaces = 127.0.0.1, eth0
map to guest = Bad User
printer admin = @ntadmin, root, administrator, bhayes
netbios aliases = icm-lin
server string = ICM Test server
password server = CONTDC15
local master = No
workgroup = BSG
valid users = bhayes,jgilbert,@superusers
security = DOMAIN
preferred master = No
bind interfaces only = Yes
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
[users]
comment = All users
path = /home
read only = No
inherit permissions = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit permissions = Yes
[printers]
comment = All Printers
path = /var/tmp
create mask = 0600
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin, root
force group = ntadmin
create mask = 0664
directory mask = 0775
[upload]
comment = ICM Upload Directory
path = /upload
read only = No
browseable = No
[root]
comment = System Root
path = /
read only = No
; hosts allow = 172.30.1.64
Something else that you could do is install webmin onto your system and then install SWAT afterwards. This will give you a graphical web interface whereby you can remotely manage your system.
yes there are only 3 machines on my network, so only i'm only using 3 usernames. i reversed the order like you suggested to no avail. i converted them to samba users through smbpasswd -a <username>, and their names show up in the smbpasswd file. i am running samba 3.07.
so, i guess i'm just going to reinstall slack to see if i can start better from scratch. this is just going to be a samba server, so does can anyone offer any good advice for post-install configuration? i'm just going to add local users, add them to the smbpasswd file, and then configure the permissions on the local side and then in the smb.conf file. the share i will create will be a full partition, is there any special fstab entry i need to make for this? thanks everyone for all your help, i really appreciate it, hopefully all goes well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.