Solved

Samba Gurus... PLEASE HELP!!!

Posted on 2000-04-03
8
382 Views
Last Modified: 2010-03-18
Hi,
I have been tinkering with samba for a few days and I'm stuck.  I am a Linux/Unix NEWBIE!

What I want samba to do:
Have the Linux box be seen as a server on an NT Domain. All windows workstations can connect to the Home Directory on the Linux Box.

What I've Done:
1. Installed Samba from the Red Hat 6.1 CD
2. Configured the Daemons to start up at boot.
3. Attempted to configure the smb.conf file a few times <G>
4. Added the same users to the linux box with the same passwords.
5. Configured the NT box to recognize the Linux Box with Server Manager.
6. Used smbpasswd -j <NT Domain> -r <NT PDC> to make it join the NT domain

Results:
The linux box appears on the Network Neighborhoods of Win 98 Stations. The workstations or NT servers can't access the linux box. Error:\\Server_2 is not accessible

I have encrypted passwords turned on because I don't want to modify my registries.

Obviously I am doing something wrong in the configuration <G>.

Here is a copy of the smbpasswd file, the smb.conf file, the smb.log anf the nmb log. If one of you Samba Guru's can figure out what I'm doing wrong, and clean up my config file so it's not so durn confoosing <G> I'd REALLY appreciate it!!!!


Reference:
These servers and workstations are on different networks and are routed by Cisco 2500's (I'm working on my CCIE). They all ping to each other fine and I'm using WINS for the InTRAnet and DNS for the InTERnet (ISDN Connection using NAT). I can reach any server from any workstation (Except Samba).  I'm using Win 98SE with the latest Novell client.  I thought it may have been due to using the novell client, but the NT Servers say the same thing about the linux box.

Server_1 = Novell 4.11, Address 10.0.1.2 (Switched Ethernet)
Server_2 = Linux Box, Address 10.0.2.2 (Ethernet)
Server_3 = NT4 PDC, Address 10.0.3.2 (Ethernet)
Server_4 = NT4 BDC, Address 10.0.4.2 (Token Ring)
WS_1 = Novell 4.11, Address 10.0.1.3 (Switched Ethernet)
WS_2 = Linux Box, Address 10.0.2.3 (Ethernet)
WS_3 = NT4 PDC, Address 10.0.3.3 (Ethernet)
WS_4 = NT4 BDC, Address 10.0.4.3 (Token Ring)


SMBPASSWD FILE:
WS_2:502:65FE049E0EABF9AEAAD3B435B51404EE:7F0E3426507C68F71F1F333AF433017B:[U ]:LCT-38E3A4EA:
WS_1:501:65FE049E0EABF9AEAAD3B435B51404EE:7F0E3426507C68F71F1F333AF433017B:[U ]:LCT-38E3A4D2:
WS_4:504:65FE049E0EABF9AEAAD3B435B51404EE:7F0E3426507C68F71F1F333AF433017B:[U ]:LCT-38E5194B:
WS_3:503:65FE049E0EABF9AEAAD3B435B51404EE:7F0E3426507C68F71F1F333AF433017B:[U ]:LCT-38E51AD9:


SMB.CONF FILE: (Generated by install and altered by me)

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not many any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = CCIELAB

# server string is the equivalent of the NT Description field
server string = Server_2

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 10.

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; printcap name = /etc/printcap
; load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = bsd

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = domain
# Use password server option only with security = server
password server = Server_3

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
password level = 8
username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/smbpasswd

# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# Unix users can map to different SMB User names
username map = /etc/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
interfaces = 10.0.2.2/24

# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
remote browse sync = 10.0.3.2
# Cause this host to announce itself to local subnets here
remote announce = 10.0.3.2

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes

# Use only if you have an NT server on your network that has been
# configured at install time to be a primary domain controller.
; domain controller = Server_3

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
logon path = \\%L\Profiles\%U

# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
wins server = 10.0.3.2

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
unix password sync = no
comment = Server_2
netbios name = SERVER_2
encrypt passwords = no
map to guest = never
password server = Server_3
password level = 0
null passwords = no
allow hosts = 10.0.0.0/255.255.255.0
os level = 0
preferred master = no
domain master = no
wins support = no
wins server = 10.0.3.2
interfaces = 10.0.2.2
name resolve order = lmhost, host, wins, bcast
add user script = /usr/sbin/adduser -s /bin/false -g popusers -c "smb account %u" %u
delete user script = /usr/sbin/deluser %u
dead time = 0
debug level = 0
message command = csh -c 'xedit %s;rm %s' &

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
public = no
allow hosts = 10.0.0.0/255.255.255.0
only user = no

# Un-comment the following and create the netlogon directory for Domain Logons
[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes
writable = no
share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /home/profiles
; browseable = no
; guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
;[printers]
; comment = All Printers
; path = /var/spool/samba
; browseable = no
# Set public = yes to allow user 'guest account' to print
; guest ok = no
; writable = no
; printable = yes
[Drive]
comment = Server_2 Drive
browseable = no
path = /home+
public = yes
guest only = no
writable = no
allow hosts = 10.0.0.0/255.255.255.0
only user = no

SMB.LOG file:
[2000/04/03 14:09:32, 1] smbd/server.c:main(628)
  smbd version 2.0.5a started.
  Copyright Andrew Tridgell 1992-1998
[2000/04/03 14:15:33, 0] lib/access.c:check_access(262)
  Denied connection from 10.0.3.2 (10.0.3.2)
[2000/04/03 14:15:34, 0] lib/access.c:check_access(262)
  Denied connection from 10.0.3.2 (10.0.3.2)
[2000/04/03 14:16:54, 0] lib/access.c:check_access(262)
  Denied connection from 10.0.4.3 (10.0.4.3)
[2000/04/03 14:17:07, 0] lib/access.c:check_access(262)
  Denied connection from 10.0.1.3 (10.0.1.3)

NMB.LOG file:
[2000/04/03 14:09:33, 1] nmbd/nmbd.c:main(684)
  Netbios nameserver version 2.0.5a started.
  Copyright Andrew Tridgell 1994-1998
[2000/04/03 14:15:22, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(406)
  *****
 
  Samba name server SERVER_2 is now a local master browser for workgroup CCIELAB on subnet 10.0.2.2
 
  *****

PLEASE HELP!!!  THis is really frustrating for a router guy <G>!!!

Regards,

Taz
0
Comment
Question by:Tazman040300
  • 5
  • 2
8 Comments
 

Author Comment

by:Tazman040300
Comment Utility
Adjusted points from 180 to 300
0
 
LVL 7

Accepted Solution

by:
lewisg earned 300 total points
Comment Utility
Several places you have the following:

allow hosts = 10.0.0.0/255.255.255.0

Since you appear to have 4 networks

10.0.1.x , 10.0.2.x , 10.0.3.x and 10.0.4.x

I think your allow hosts should be:

allow hosts = 10.0.0.0/255.255.0.0

You could comment out all the allow hosts lines or change them. You may want to try the following smb.conf as a test...

[global]
workgroup = CCIELAB
server string = Server_2
encrypt passwords = yes
smb passwd file = /etc/smbpasswd

[homes]
browseable = no
writable = yes
 
Remember to run testparm after you edit smb.conf!
0
 

Author Comment

by:Tazman040300
Comment Utility
Ok... with your simple confgig... the errors dissapear.  Here is the new LOG.SMB



[2000/04/04 08:10:14, 1] smbd/server.c:main(628)
  smbd version 2.0.5a started.
  Copyright Andrew Tridgell 1992-1998
[2000/04/04 08:10:14, 1] smbd/files.c:file_init(216)
  file_init: Information only: requested 10000 open files, 1014 are available.


No errors on boot or when a workstation tries to access.

BUT... The workstations STILL regard Server_2 as not accessable when I double click on it on Network Neighborhood.


Thanks for the reply,

Taz
0
 

Author Comment

by:Tazman040300
Comment Utility
FIXED!!!

Simplified Config:

[global]
    workgroup = CCIELAB
    server string = SERVER_2
    security = domain
    encrypt passwords = yes
    smb passwd file = /etc/smbpasswd
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    interfaces = 10.0.2.2/24
    remote announce = 10.0.3.2
    wins server = 10.0.3.2

[drive]
    path = /drive
    comment = Linux Share Drive
    volume = Linux_Drive
    browseable = yes
    writeable = yes
    guest ok = yes


Did a chmod 777 /drive to get the share working.  Thanks for your help Lewis.  This was driving me nuts! <G>  It's unfortunate that the Samba install generates such a complex config file that confuses the hell out of us newbies! <G>

Regards,

Taz

P.S. I dunno how to give you the points without you specifying "Answer".  Though I did figure it out... your post put me in the right direction, so I think you still deserve the points!!!
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 7

Expert Comment

by:lewisg
Comment Utility
Just accept the comment as an answer.

Yes the default smb.conf file is a bit confusing, but at least it has good comments. I am a little old fashoned in that I print out the default file, then scribble all over it, then edit the hell out of it.

Glad I could be of some help...
0
 

Author Comment

by:Tazman040300
Comment Utility
Lewis's comments pointed me in the right direction to figure out the problem.

Kudos Lewis!

Taz
0
 

Author Comment

by:Tazman040300
Comment Utility
Forgot... In order for that config to work you DO need a [homes] area... I cut it out because I didn't think it was that important... boy was I wrong <G>

The Correct Config:

[global]
    workgroup = CCIELAB
    server string = SERVER_2
    security = domain
    encrypt passwords = yes
    smb passwd file = /etc/smbpasswd
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    interfaces = 10.0.2.2/24
    remote announce = 10.0.3.2
    wins server = 10.0.3.2

[homes]
    comment = Home Directories
    browseable = no
    writeable = yes

[drive]
    path = /drive
    comment = Linux Share Drive
    volume = Linux_Drive
    browseable = yes
    writeable = yes
    guest ok = yes



0
 

Expert Comment

by:isotope33
Comment Utility
Greetings,
this can help:
i hope you have created the computeraccount $WS_2 in your passwd fiel and with
smbpasswd -a -m WS_2 in your smbpasswd
e.g. for computer WS_2
then
look at your entry in the smbpasswd file.
-----------
SMBPASSWD FILE:
WS_2:502:65FE049E0EABF9AEAAD3B435B51404EE:7F0E3426507C68F71F1F333AF433017B:[U ]:LCT-38E3A4EA:
-^
change the [U ] to [W ]

now the computer is a member your domain.(I hope)


0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now