Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Ok Im using Swat to creat my smb.conf file. and I dont understand why when I look in the /etc/samba/smb.conf file is different? I mean if I use swat to configure my smd.conf file where is it saving the info to?
I guess I'm kinda of lost. I added the shared folder using swat which is /export/samba/data and I still can't access it. Do I have to mount it or something? I did the Chmod 777 but when I try to go on my XP machine to access it I get this error
\\Rhlinux is not accessible. You might not have permission to use this network resources. Contact Administrator of the server to find out if you have access permissions.
What am I doing wrong or what am I missing?
Last edited by Alinuxnoob; 06-06-2002 at 10:32 AM.
I stopped using swat once I realised it was over-complicating things for me!!
I'm assuming here that you cannot even 'see' the share in windows.
There are a few things that have to be done after changing smb.conf -
-Make sure the changes had been saved (by pressing the confirm changes button)
-Stop the smbd and nmbd services, then start them again. I found that stopping both then starting both worked better that restarting one then the other (if you get my drift)
To confirm Samba is running, type
ps -A | grep 'mbd'
and you should see smbd and nmbd (the two daemons) - if you don't, then samba isn't running. Type in smbd (enter) then nmbd (enter) to start the services. (I think there is an option in Service Configuration in Red Hat to start swat at bootup - which would start Samba)
you can then take look at what's going on by typing this:
smbclient -U% -L localhost
and it should bring up a load of details about your shares and servers. Hopefully, your new sharename will be here.
If this is the case, then you should be able to browse to it from Network Neighbourhood in Windows.
You don't have to mount anything in order to get things working - as far as I am aware.
If none of this works, then it might be an idea to look at your smb.conf file in an editor and try and figure out what's wrong - or post it here.
By the way, if you can now see the share but can't access it, (even after chmod 777'ing it) make sure you've set anonymous access to it in swat (I think it's referred to as 'guest ok') - also set read only to 'no' and public to 'yes'.
I would sudgest droping swat... Use the smb.conf file to do your editing you don't have to restart the service to make changes...
and it's cake to edit.
it should live in /etc/samba - that's usually the location where linux has it. Altetnatively, try /usr/local/samba
try this version of the smb.conf file (and I think you'll have to restart the service to see the changes):
I'm not 100% sure what all the parameters in the [global] section mean, but they seem fine on a bunch of systems I've used. If you wanna have a play, comment out one at a time (using a #) and see what happens - after you've got it working of course
# Global parameters
[global]
workgroup = REPAIR
netbios name = RHLINUX
server string = Samba2.2.4Data
hosts allow = 192.168.0. #or whatever you're using
security = share
encrypt passwords = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
wins support = Yes
printing = lprng
[data]
comment = whatever
path = /tmp
read only = no
guest ok = Yes
public = yes
When I try to run smbclient -L rhdata I get this error
tbd ((null)): tdb_open_ex: could not open file /var/cache/samba/unxepected.tdb: NO suck fule or directory and does this 10x and then says connection to rhdata failed
this is what my smb.conf file looks like
# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2002/06/18 07:18:53
# Global parameters
[global]
workgroup = REPAIR
netbios name = RHLINUX
server string = rhdata
security = SHARE
[homes]
quest ok = no
read only = no
[/export/samba/data]
path = /tmp
guest ok = Yes
only user = Yes
and I noticed your smb.conf file wasn't similar to the one I suggested. Try using the one I suggested, then restart the samba daemons (instructions in my first post).
OK How do I restart smbd and nmbd? Cause I edit the smb.conf file for what you suggeusted but now I can't start it unless I use SWAT to start it? and when I start it with Swat the SMB conf file I changed did not apply to what you sugguested....
Hmm. It looks to me that you've got more than one instance of Samba running.
Firstly, for the moment, stop using SWAT. It's complicating the issue.
We need to figure out what's going on - and how many instances you've got on your machine.
Smbd and nmbd are just executable files on your machine.
log in as root and type the following:
cd /
find . -name 'smbd' -print
this will locate all the files on your machine with the name 'smbd'.
I'm guessing you've got more than one. Do the same for nmbd.
Note down where they are. Hopefully, one set live in
/usr/sbin/
now do a search for smb.conf
cd /
find . -name 'smb.conf' -print
there should be one in
/etc/samba/
This is the version you should be editing. Do it manually in a text editor by browsing to the directory using the graphical interface or on the command line using vi.
You may want to rename all the other versions of the file (if you have more than one) to something else (like smb_backup.conf) to prevent them from being accidentally used.
Next, kill all smbd and nmbd processes running by firstly identifying them:
my share is called Downloads. You should get yours appearing.
To summarise:
-don't use SWAT
-locate your smbd and nmbd files
-locate your active smb.conf and rename the others
-edit smb.conf
-kill all smbd and nmbd processes
-restart smbd and nmbd
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.