smb.conf.%U problem for NT (95 ok)

Syahrul Sazli Shaharir sazli at mimos.my
Thu Mar 25 10:32:03 GMT 1999


Hi SMB'ers,

Summary: smb.conf.%U doesn't work on NT clients (Win 95 OK).

Setup:-
  Samba 2.0.3 on Redhat 5.2 + shadow passwds.
  Hostname / netbios name: archives
  smb.conf.%G defines [%G] share
  smb.conf.%U defines [samba] share for %U=sazli

(smb.conf attached below)

A little bit of what happened:-

	* Run: \\archives *

  switch message SMBnegprot (pid 21457)
  Requested protocol [PC NETWORK PROGRAM 1.0]
  Requested protocol [XENIX CORE]
  Requested protocol [MICROSOFT NETWORKS 1.03]
  Requested protocol [LANMAN1.0]
  Requested protocol [Windows for Workgroups 3.1a]
  Requested protocol [LM1.2X002]
  Requested protocol [LANMAN2.1]
  Requested protocol [NT LM 0.12]
  Selected protocol NT LM 0.12
  Transaction 2 of length 189
  switch message SMBsesssetupX (pid 21457)
  Domain=[EOFF]  NativeOS=[Windows NT 1381] NativeLanMan=[]
  sesssetupX:name=[Sazli]

	* Process smb.conf (go through params) - OK *

  pm_process() returned Yes
  adding IPC service
  adding home directory sazli at /export/home0/user/sazli
  sazli is in 2 groups: 14, 200
  uid 1259 registered to name sazli
  Clearing default real name
  User name: sazli      Real name: Syahrul Sazli Shaharir, CFD,6126
  Chained message
  switch message SMBtconX (pid 21457)
  Allowed connection from sazli.mimos.my (192.228.129.44)
  smb_password_check failed. Invalid password given for user 'sazli'
  ACCEPTED: validated uid ok as non-guest
  sazli logged in as admin user (root privileges)
  Connect path is /tmp
  dos_ChDir to /tmp
  dos_ChDir to /usr/local/samba/swat
  sazli (192.228.129.44) connect to service IPC$ as user sazli (uid=1259,gid=14) (pid 21457)
  tconX service=ipc$ user=sazli

2. I see all shares. When I double click on the share [samba], which
is defined in smb.conf.%U:-

	* Re-read params : error in crucial places, e.g. :- *

  doing parameter include = /usr/local/samba/lib/smb.conf.%G
[1999/03/25 17:26:38, 2] param/loadparm.c:handle_include(1865)
  Can't find include file /usr/local/samba/lib/smb.conf.nobody

	* Final result: Not what I wanted (Connecting as guest):- *

  pm_process() returned Yes
  adding IPC service
  nobody is in 1 groups: 60001
  uid 60001 registered to name nobody
  Clearing default real name
  User name: nobody     Real name: Nobody

	* which leads to further errors:- *

  checking for home directory samba gave (NULL)
  find_service() failed to find service samba
  sazli (192.228.129.44) couldn't find service samba
  error packet at line 162 cmd=117 (SMBtconX) eclass=2 ecode=6
  error string = No such file or directory

3. This error comes up on the NT desktop: 

	\\archives\samba
	The network name cannot be found.

4. And when I refresh the shares list, I get all shares except the ones
defined in smb.conf.%G and smb.conf.%U.

What gives? I tried setting "nt smb support = no" & "nt pipe support =
no" but to no avail. 

It works perfectly under Win95.

Thanks for your help.. 

Sazli
sazli at mimos.my

-------
smb.conf
--------
#======================= Global Settings =====================================
[global]

#--------------#
# Base Options #
#--------------#

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

netbios name = ARCHIVES
netbios aliases = PUBLIC

# server string is the equivalent of the NT Description field
server string = Archives Samba V%v (Redhat Linux 5.2)

#------------------#  
# Security Options #
#------------------#

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user

# 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

map to guest = Bad User
null passwords = yes

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

passwd program = /usr/bin/passwd
passwd chat = *(current)*UNIX*password* %o\n *New*UNIX*password* %n\n
*Retype*n$
passwd chat debug = yes
unix password sync = no
guest account = nobody
admin users = root administrator sazli ros
create mask = 0644     
hosts allow = localhost, 127.0.0.1, 192.228.0.0/255.255.0.0

#-----------------#
# Logging Options #
#-----------------#

log level = 3

# This tells Samba to use a separate log file for each machine
# that connects (%m), via each different netbios names.
log file = /var/log/samba/log.%U:%G-%m

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

#----------------# 
# Tuning Options #
#----------------#

deadtime = 5
read prediction = yes

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

#------------------#
# Printing Options #
#------------------#

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
load printers = yes

#-------------------#
# Filename Handling #
#-------------------#

# Be very careful with case sensitivity - it can break things!
case sensitive = no

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
preserve case = yes  
short preserve case = yes
hide dot files = no

#--------------#
# WINS Options #
#--------------#

# 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 = w.x.y.z
wins server = 192.228.129.32

#-----------------#
# Locking Options #
#-----------------#

share modes = yes

#-----------------------#
# Miscellaneous Options #
#-----------------------#
   
# Cause this host to announce itself to local subnets here
#   remote announce = 192.168.1.255 192.168.2.44
remote announce = 192.228.129.255 192.228.130.255 192.228.131.255

# 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 = 192.168.3.25 192.168.5.255
remote browse sync = 192.228.129.255 192.228.130.255 192.228.131.255

unix realname = yes

#============================ Share Definitions ==============================
   
include = /usr/local/samba/lib/smb.conf.%G
   
[homes]
   comment = Home Directories
   read only = No
   browseable = no
   hide dot files = yes
   hide files = INBOX/mail/News
   
# A publicly accessible directory, but read only, except for root
[pub]
   comment = Public Repository
   path = /data/pub
   read only = No
   guest ok = Yes

[install]
   comment = Installation Scripts
   path = /data/pub/scripts
   read only = No  
   guest ok = Yes

[incoming]
   comment = Uploads
   path = /data/incoming
   read only = No
   guest ok = Yes

# This one is useful for people to share files
[uploads]
   comment = Uploads
   path = /data/uploads
   force user = %U
   read only = No
   guest ok = Yes
   admin users = root administrator sazli %U

-----------------
smb.conf.sysadmin
-----------------

[%G]
   comment = Directory for %G
   path = /usr/data/%G
   read only = No
   create mask = 0660
   directory mask = 0770
   write list = @%G

--------------
smb.conf.sazli
--------------
[samba]
   comment = Samba Directory
   path = /usr/local/samba
   read only = No
   guest ok = Yes




More information about the samba-technical mailing list