• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

does smb.conf file specify the directories I'm sharing

DeadSeaSquirrels

Senior member
I am running RH 9.0 right now, and trying to use Samba to connect to a 2000 machine. I've followed a bunch of different tutorials to configure the .conf file the way I think works. I got it working enough so that in my 2000 machine I can see the folder. My smb.conf file looks something like this:
# workgroup = NT-Domain-Name or Workgroup-Name
log level = 2
log file = /var/log/samba.log
netbios name = example-server
security = SHARE
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUG=8192
wins support = yes
encrypt passwords = yes
workgroup = ondago

[public]
browseable = yes
create mode = 0666
directory mode = 0777
guest only = yes

[test]
comment = For testing only
path = /export/samba/test
writeable = yes
guest ok = yes
encrypt passwords = yes


Right now though, when I click on the folder from Windows, I can't get access to the files in that directory. But I'm starting to read the AT FAQ right now, and it talks about mounting also. So I am a little confused. I was under the assumption that the lines above that read:

netbios name = example-server
workgroup = ondago
path = /export/samba/test

specified which folders were being shared...what the linux host name was, and the workgroup. Now I am reading something about needing to mount directories to share a folder. So if that is the case, what is all this stuff in the smb.conf file all about? Granted I probably don't understand what is going on now, since my Samba network isn't working. But can somebody please just give me some real detail guidance, or direct me somewhere, so that I can figure this out.
 
The first part of your conf looks OK. However, under the [public] share, there is a problem. There is no path set to it. So you cannot access it, because it does not exist! Also, under [test], there should not be 'encrypt passwords=yes'. That is a global only variable. Does the 'test' folder open? If it does, and public doesn't, set a path for the public share, or delete it.
ex: Sample conf:

log level = 2
log file = /var/log/samba.log
netbios name = example-server
security = SHARE
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUG=8192
wins support = yes
encrypt passwords = yes
workgroup = ondago

[public]
path = /foo/bar
comment = foobar
browseable = yes
create mode = 0666
directory mode = 0777
guest only = yes

[test]
comment = For testing only
path = /export/samba/test
writeable = yes
guest ok = yes

Edit: Small spelling errors 🙂
 
Thanks for the help. I'll make those changes and let you know what happens. But what about my question about the mounting? Is the mounting the reverse of what I am doing? I mean I am trying to make linux directories viewable by my 2k machine, is mounting trying to make the win2k directories viewable by linux?
 
mounting is the action of making something available on the local machine. For windows this mean making a file share or partition mounted to a drive letter, in Linux this means mounting a filesystem or share to a directory on the local filesystem.

Putting shares in smb.conf and exporting them to Windows is called exporting or sharing filesystems.
 
You should only have to mount (with regards to SAMBA) when trying to get to an SMB share on a remote machine from a Linux computer.
 
so I followed the AT FAQ and did this;
mkdir /mnt/share
mount -t smbfs -o username=username,password=password //compname/sharename /mnt/share

It gave me some weird message, but it wasn't one of the error messages that was on the AT FAQ. I am not sure if it is mounted though, how do I check. Anyway, now things work. A little bit. On my win2k machine I can access my linux computer and the folder. It has a few folders though, and I have no idea, how I created all those share folders. Basically I don't know when I set them. Like a bad scientist, I didn't alter one factor at a time. I made all the changes that everybody suggested, and then ran it. Now it works, but I'm not sure why. Anyway I have another question...within the smb.conf file there is a Netbios name = parameter, I guess that sets the name of your computer when using the Netbios protocol. But I am using KDE and I can also changing the setting by typing "hostname" and then the new name. So which one takes precedence. The other thing I did, which I'm not sure if it was what made everything worked was doing a smbpasswd and adding the user on the win2k machine. How do I see a list of the smbpasswd users?
 
Originally posted by: DeadSeaSquirrels
so I followed the AT FAQ and did this;
mkdir /mnt/share
mount -t smbfs -o username=username,password=password //compname/sharename /mnt/share

It gave me some weird message, but it wasn't one of the error messages that was on the AT FAQ. I am not sure if it is mounted though, how do I check. Anyway, now things work. A little bit. On my win2k machine I can access my linux computer and the folder. It has a few folders though, and I have no idea, how I created all those share folders. Basically I don't know when I set them. Like a bad scientist, I didn't alter one factor at a time. I made all the changes that everybody suggested, and then ran it. Now it works, but I'm not sure why. Anyway I have another question...within the smb.conf file there is a Netbios name = parameter, I guess that sets the name of your computer when using the Netbios protocol. But I am using KDE and I can also changing the setting by typing "hostname" and then the new name. So which one takes precedence. The other thing I did, which I'm not sure if it was what made everything worked was doing a smbpasswd and adding the user on the win2k machine. How do I see a list of the smbpasswd users?


mount will list the current mounts.

What was the error message?
 
Back
Top