LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-06-2002, 10:19 AM   #1
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Rep: Reputation: 30
Samba Help with Swat?


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.
 
Old 06-08-2002, 09:50 PM   #2
shariq
LQ Newbie
 
Registered: Jun 2002
Location: London, UK
Distribution: SuSe 8.0 Pro
Posts: 7

Rep: Reputation: 0
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'.
 
Old 06-18-2002, 09:25 AM   #3
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
This is my smb.conf file



# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2002/06/18 07:19:32

# Global parameters
[global]
workgroup = REPAIR
netbios name = RHLINUX
server string = Samba2.2.4Data
security = SHARE
guest account = guest ok

[/export/samba/data]
path = /tmp
guest ok = Yes
only user = Yes


I'm still kinda of lost I can see it but can't access it.....
 
Old 06-18-2002, 02:58 PM   #4
Undertoe
LQ Newbie
 
Registered: Jun 2002
Distribution: RH 7.3
Posts: 2

Rep: Reputation: 0
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.

DM
 
Old 06-19-2002, 12:09 PM   #5
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
Where do I edit the SMB.conf file... I have a bunch of smb.conf files and don't know which one to edit? In Redhat where do you edit the smb.conf file?
 
Old 06-24-2002, 05:37 PM   #6
shariq
LQ Newbie
 
Registered: Jun 2002
Location: London, UK
Distribution: SuSe 8.0 Pro
Posts: 7

Rep: Reputation: 0
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
 
Old 06-25-2002, 10:12 AM   #7
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
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


IM I missing something?
 
Old 06-25-2002, 10:25 AM   #8
shariq
LQ Newbie
 
Registered: Jun 2002
Location: London, UK
Distribution: SuSe 8.0 Pro
Posts: 7

Rep: Reputation: 0
to test the samba status, type exactly:

smbclient -U% -L localhost

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).
 
Old 06-27-2002, 05:49 PM   #9
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
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....
 
Old 06-27-2002, 06:38 PM   #10
shariq
LQ Newbie
 
Registered: Jun 2002
Location: London, UK
Distribution: SuSe 8.0 Pro
Posts: 7

Rep: Reputation: 0
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:

ps -A | grep 'mbd'

you'll get something like this:

oaxis-delta:/ # ps -A | grep 'mbd'
1155 ? 00:00:00 smbd
1157 ? 00:00:00 nmbd
1158 ? 00:00:00 nmbd
oaxis-delta:/ #


then type in

kill 1155 (or whatever your corresponding process id is)

and type ps -A | grep 'mbd' again:

oaxis-delta:/ # ps -A | grep 'mbd'
1157 ? 00:00:00 nmbd
1158 ? 00:00:00 nmbd
oaxis-delta:/ #


the corresponding process is now dead. Do this for all instances of smbd and nmbd until typing ps -A | grep 'mbd' yeilds nothing.

Now, restart smbd and nmbd by typing

smbd
nmbd


if this does not work, then do

/usr/sbin/smbd
/usr/sbin/nmbd


to start them.

Assuming you're smb.conf is correct, when you type

smbclient -U% -L localhost (exactly - don't replace localhost with your computer name)

I get this:

oaxis-delta:/ # smbclient -U% -L localhost
added interface ip=192.168.0.2 bcast=192.168.0.255 nmask=255.255.255.0
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.3a]

Sharename Type Comment
--------- ---- -------
Downloads Disk downloads
IPC$ IPC IPC Service (Samba Server)
ADMIN$ Disk IPC Service (Samba Server)

Server Comment
--------- -------
OAXIS-ALPHA
OAXIS-DELTA Samba Server

Workgroup Master
--------- -------
WORKGROUP OAXIS-ALPHA
oaxis-delta:/ #


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

hopefully - this should sort out the problem(s)!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Samba/SWAT driesel Linux - Newbie 3 02-13-2005 09:33 AM
Samba + SWAT mooler Linux - Networking 5 11-13-2003 09:46 AM
Samba and swat james.farrow Linux - Networking 7 04-04-2003 11:27 AM
Swat Samba whatever! theguy311 Linux - Software 8 01-25-2003 01:42 PM
SAMBa and SWAT Snake007uk Linux - General 8 05-16-2002 07:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration