MandrivaThis Forum is for the discussion of Mandriva (Mandrake) 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.
Using Mandriva 2006, I just can't get Samba to work. Can somebody post the normal default smb.conf file? I've been screwing around with mine for a week and nothing works. I think I better start from scratch.
Also, what entry to I need in smb.conf for a share that can be written to, and read from on a Windows machine? I move rather large files back and forth and its alot easier with samba. I don't want to use ftp.
I just need a general use all crap directory to dump stuff to and from.
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SuSE
# Date: 2005-01-28
[global]
workgroup = #####
server string = Samba Server
hosts allow = 192.168.1. 127.
os level = 99
time server = no
unix extensions = Yes
encrypt passwords = Yes
map to guest = Bad User
# printing = CUPS
# printcap name = CUPS
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
wins support = yes
veto files = /*.eml/*.nws/riched20.dll/*.{*}/
log file = /var/log/samba.%m
max log size = 50
security = user
domain master = yes
preferred master = yes
[data]
comment = Server Files
path = /data
browseable = yes
read only = No
create mask = 0640
directory mask = 0750
I used to use SuSE 8.2 for my server, but I now use slackware. I just pasted the file into the /etc/samba directory - worked fine. That's why SuSE is mentioned in the comments. Very basic. Printing is commented because I have no printer attached to the server.
Here is my smb.conf file...
Under the windows machine I just get propted for a usernamt and password. I enter in my linuc account and linuc password - nothing. I don't get in.
Here is what happens when I try to execute the smbpasswd command as root:
[root@Prometheus samba]# smbpasswd justin
New SMB password:
Retype new SMB password:
Failed to find entry for user justin.
Failed to modify password entry for user justin
Code:
[global]
workgroup = SHAKESPEARE
server string = My Lil Linux Box
log file = /var/log/samba/%m.log
security = user
# encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[Downloads]
comment = Downloads
path = /home/samba
browseable = yes
writable = yes
public = yes
read only = no
# [homes]
# comment = My Home Directory
# browseable = yes
# writable = yes
# public = yes
# read only = no
[printers]
path = /var/spool/samba
public = yes
guest ok = yes
printable = yes
browseable = yes
writable = yes
read only = no
Here is what happens when I try to execute the smbpasswd command as root:
[root@Prometheus samba]# smbpasswd justin
New SMB password:
Retype new SMB password:
Failed to find entry for user justin.
Failed to modify password entry for user justin
OK, I'm back to square one. Everytime I do a chmod 777 on the directory, it works fine for a while. Then after a few minutes, I get this on the Windows end.
What is the ownership on that /home/samba directory? Make sure justin is in the group that owns it. Mandriva's security program automatically removes world-writable permissions from things in /home. You can disable this in the Mandrake Control Centre but its easier to set things up properly by changing the group ownership.
What is the ownership on that /home/samba directory? Make sure justin is in the group that owns it. Mandriva's security program automatically removes world-writable permissions from things in /home. You can disable this in the Mandrake Control Centre but its easier to set things up properly by changing the group ownership.
Here's the ownership information
total 32 drwx--x--x 39 justin justin 4096 Jan 4 09:26 justin/
drwx--x--x 2 root root 16384 Dec 22 17:43 lost+found/
drwx--x--x 3 mike mike 4096 Dec 22 20:00 mike/
drwx--x--x 2 nobody root 4096 Jan 2 16:45 public/
drwx--x--x 2 nobody root 4096 Jan 2 21:57 samba/
I'm hoping to make this a general share so all users can access it.
Maybe it would be easier to get it out of the home directory and stick it somewhere else? If thats a good idea, where do you think I should put it? I need alot of space as files can hit a gig. etc?
Are you using the latest release of Samba 3.0.21a? If not try updating the Samba server to see if that helps.
Probably more trouble than its worth since updating samba is only going to help if there's a new feature in a later version that you need (Mandriva backports all the bug-fixes).
Quote:
Snump: drwx--x--x 2 nobody root 4096 Jan 2 21:57 samba/
These permissions look like the problem, not your samba setup. Since the Mandriva security checks will remove world writable permission from directories in /home the cleanest solution is probably to create a group (call it whatever you want) and put all the users in it that you want to be able to access that directory (see Mandrake Control Centre->System->Add Users.. to create your group and add users to it).
Now make the directory owned by that group
Code:
chown -R :groupname /home/samba
and also setgid on it so that files and folders created in future will have the same group ownership
Code:
find /home/samba -type d -exec chmod g+s {} \;
(this command sets it on any existing subfolders too)
Finally add the group name prefixed with '@' to the valid users line in the stanza for that share in smb.conf
Code:
valid users=@groupname
The other way would be to turn off the automatic fixing of home dir permissions in the Mandrake Control Centre->Security->Set Security Level...->Periodic Checks and disable 'Check Permissions of Files in User's Home' and 'Check files/directories writable by everybody'. But this is a bad, hacky, security-compromising solution so try the group ownership thing first
You still need to give the samba group read and write access on that directory (and the files and folders under it):
Code:
chmod -R g+rw /home/samba
we're getting close.
It worked for a few minutes, but now I can't access that directory from the Mandriva machine. It says I don't have permission.
Let me ask you this, is it possible to have a home directory shared? If so, would each person's homedir be shared all the time, or just when they log into X?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.