P. 1
Samba

Samba

|Views: 167|Likes:
Publicado porNurul Istiqomah

More info:

Published by: Nurul Istiqomah on Dec 14, 2010
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/21/2014

pdf

text

original

As mentioned,if Samba doesn’t work on the Samba server (the same box),it certainly
won’t work elsewhere. Same-box Samba must be working before other troubleshooting is
attempted.

Correct Configuration

smb.confmust be correct. Although it’s difficult to ascertain correctness,there’s a very
easy method of determining smb.confsyntax legality. Run testparmto prove whether

smb.confis legal and to see what shares it declares.

Creating a Simple Samba Proof of Concept

CHAPTER6

183

6

C

R
E
A
T
I
N
G
A

S

I
M
P
L
E

S

A
M
B
A

P

R
O
O
F
O
F

C

O
N
C
E
P
T

Caution

Do not add the following parameters to smb.confif your network is live and
contains a master browser. The following example is best followed on a small,
encapsulated network with a single Samba server and no other SMB protocol
servers.

09 8628 CH06 3/17/00 12:54 PM Page 183

Daemon

Obviously,Samba won’t work if it isn’t running. These two commands can be used to
test whether the smbdand nmbddaemons are running:

ps -ax | grep smbd
ps -ax | grep nmbd

Here’s a possible output of two such commands:

[root@mainserv username]# ps -ax | grep smbd
13492 ? S 0:00 smbd -D
[root@mainserv username]# ps -ax | grep nmbd
13503 ? S 0:00 nmbd -D
13504 ? S 0:00 nmbd -D
13559 pts/0 S 0:00 grep nmbd
[root@mainserv username]#

Notice that two nmbddaemons are running. That’s okay. In a large installation,there can
be many copies of either or both daemons running. That’s perfectly okay. Also notice
that one of the grepcommands found itself.

If both daemons are not running,restart Samba. There’s no use continuing troubleshoot-
ing until the daemons can be run.

Local Accessibility

Interestingly enough,it’s usually easier to access a share than it is to see it in a browse.
Here’s the command and session for locally accessing user username’s [homes]share:

$ smbclient ‘//mainserv/homes’ -Uusername

Added interface ip=192.168.100.1 bcast=192.168.100.255 nmask=255.255.255.0
Password:
Domain=[TEST2] OS=[Unix] Server=[Samba 2.0.3]
smb: \> ls .b*

.bash_logout H 24 Thu Sep 2 15:52:43 1999
.bash_profile H 230 Thu Sep 2 15:52:43 1999
.bashrc H 124 Thu Sep 2 15:52:43 1999
.bash_history H 8003 Sun Oct 10 08:30:30 1999

61906 blocks of size 32768. 13687 blocks available

smb: \> quit
$

Note that the resource in the preceding command could have been //mainserv/username
instead of //mainserv/homes. If the user is username,the two are equivalent.

If the share was meant to be writable,smbclient’s internal putcommand could have
been used to test the writability of the share. Obviously,extreme care must be taken not
to overwrite an existing file.

Creating a Turnkey Samba System

PARTII

184

09 8628 CH06 3/17/00 12:54 PM Page 184

Local Browseability

As mentioned before,browseabilityis more complex than mere accessibility. First,
shares might be deliberately marked as “not browseable,”in which case the correct
behavior is not to enumerate them in a share. Beyond that,depending on items such
as browse masters and browser elections,browses might not be visible,especially on
Windows clients.

Local browseability is much more consistent,usually depending only on smb.conf
parameters. Here’s the test for same-box browseability for server mainservfrom the
command line of mainserv:

$ smbclient -NL mainserv

Added interface ip=192.168.100.1 bcast=192.168.100.255 nmask=255.255.255.0
Domain=[TEST2] OS=[Unix] Server=[Samba 2.0.3]

Sharename Type Comment
--------- ---- -------
homes Disk
IPC$ IPC IPC Service (Samba 2.0.3)

Server Comment
--------- -------
MAINSERV Samba 2.0.3

Workgroup Master
--------- -------
TEST2

$

Note that the output lists homesas browseable,so it is.

Same-Box Samba: A Discussion

The same-box tests test Samba itself. Passing all these tests means Samba,itself,is
working correctly. The remaining question is whether it can convey that information to
clients,which requires network connectivity and Samba accessibility from Windows.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->