LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Samba and XP issues (https://www.linuxquestions.org/questions/slackware-14/samba-and-xp-issues-399994/)

scrupul0us 01-05-2006 06:32 PM

Samba and XP issues
 
So I'm new to 10.2 and seem to be having some Samba issues... ive configured all the samba settings via the Control Center in KDE and have edited /etc/samba/smb.conf to reflect some suggestions via some googling... for some odd reason if I set the mode to "SHARE" i can see my one shared path in XP, but I want it to ask for a user/pass so i set it to "USER" but then it doesnt work... it keeps asking for a user/pw... i give it the account ive added as a specified user for the share and have tried adding the user to the "users" tab in the samba settings, but it doesnt let me apply the addition of the name and is ignored... smbadduser doesnt work in console either... bash reports its an unknown command... for some reason

ideas? im trying to access via XP SP1... both machines can ping and XP can see the share in net neighborhood

scrupul0us 01-05-2006 06:46 PM

Here is my conf file:

# 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
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba HOWTO Collection.
#
# 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 made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

workgroup = LOCNET
server string = SERVER
encrypt password = YES
samba password file = /etc/samba/smbpasswd
; hosts allow = 192.168.1. 192.168.2. 127.

load printers = yes

# you may wish to override the location of the printcap file
; printcap name = /etc/printcap

# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
; printcap name = lpstat

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

# 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.%m

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

# Use password server option only with security = server
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
; password server = <NT-Server-Name>

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
; realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
; passdb backend = tdbsam

# 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.
# Note: Consider carefully the location in the configuration file of
# this line. The included file is read at that point.
; include = /usr/local/samba/lib/smb.conf.%m

# Most people will find that this option gives better performance.
# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
# and the manual pages for details.
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# 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 = 192.168.12.2/24 192.168.13.2/24

# 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

# 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

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

# 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 default is NO.
dns proxy = no
restrict anonymous = no
domain master = no
preferred master = no
max protocol = NT
ldap ssl = No
server signing = Auto

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/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 = /usr/local/samba/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
printable = yes

[WEBROOT]
case sensitive = no
msdfs proxy = no
path = /var/www/
comment = Webserver Root
admin users = scrupul0us
valid users = scrupul0us
dos filemode = yes
browseable = no
read only = no

mdarby 01-05-2006 08:13 PM

Did you create the samba user account with smbpasswd?
Code:

smbpasswd -a <existing_system_username>

centauricw 01-05-2006 08:20 PM

The thing to remember is that Samba is designed to emulate a Windows NT sytle domain. With security set to USER, the Samba server is effectively a PDC. Here is an example smb.conf that should work (or at least provide a good foundation):

----- Begin smb.conf -----

[global]
workgroup = LOCNET
server string = Samba Server
interfaces = eth0
passdb backend = tdbsam
username map = /etc/samba/smbusers
log level = 2
log file = /var/log/samba/%U.log
max log size = 100
name resolve order = bcast lmhosts host wins
time server = Yes
printcap name = cups
logon script = logon.bat
logon drive = H:
domain logons = Yes
preferred master = Yes
domain master = Yes
dns proxy = No

[homes]
comment = Home Directories
read only = No
browseable = No

[netlogon]
comment = Network Logon Service
path = /etc/samba/netlogon
guest ok = Yes
share modes = No

[printers]
comment = All Printers
path = /usr/spool/samba
printable = Yes
browseable = No

[webroot]
path = /var/www
comment = Webserver Root
read only = no
browseable = no
valid users = scrupul0us

----- End smb.conf -----

Look in the smb.conf man page for details on the various options. Then set the workgroup on your Win XP machine to LOCNET and create user accounts on the Linux box. They do not need a Linux password but they do need a Samba password using the command "smbpasswd -a <username>".

This should allow you to mount Samba file shares on your Win XP box.

scrupul0us 01-06-2006 03:30 PM

ok... i changed the conf file and did the smbpasswd command and it now lets me in but i cannot see any shares but the printers and faxes... ::sighs::

mdarby 01-06-2006 03:42 PM

Did you restart samba? (/etc/rc.d/rc.samba stop/start)

centauricw 01-06-2006 06:11 PM

Also make sure that you have rights to view the directory and files under Linux. Samba compiles with the Linux file system security.

scrupul0us 01-06-2006 11:29 PM

ok.. i had to select browsable... i can now traverse the dir but i cannot create any new files/folders via windows... i have gave the user admin rights in samba

mdarby 01-07-2006 01:08 AM

Does the XP user have filesystem rights to the actual directory? Are they in the "write list" directive in smb.conf?

canuck_barlow 01-07-2006 01:23 AM

I'm actually having the same issue... I can see the shares on my Slackware server through samba but I don't seem to have write access to it. Everything is setup fine in samba, which made me think... is there a firewall that is automatically installed and ran in Slackware 10 and if so is there anything we have to do in order to allow write permissions on samba shares?

gilead 01-07-2006 02:12 AM

This doesn't sound like a firewall problem - if you're seeing the share, the firewall is letting you through. It sounds more like permissions or config.

The users you have created on the Linux box will need write access to the shares that the equivalent windows users are trying to access. You can create a share like the following to give users (or groups) the access you specify.

Here is a share that is read only to everyone except root and myself:

Code:

[photos]
  comment = Photos and scans
  path = /usr/local/stuff/photos
  read only = yes
  write list = steve, root
  available = yes

The directory above has the following permissions:

Code:

drwxrwxr-x  104 steve steve 4096 2005-12-26 09:05 /usr/local/stuff/photos
Here is a share that is writable by a group:

Code:

[websters]
  comment = Shared area for printing files, etc.
  path = /usr/local/www/websters
  writable = yes
  available = yes
  valid users = @websters
  create mask = 0660
  directory mask = 0770
  force group = websters

The directory above has the following permissions:

Code:

drwxrwsr-t  9 steve websters 4096 2005-12-30 06:21 /usr/local/www/websters
I use user level security and each of the Linux users was added to samba with the `smbpasswd -a username` command. I don't use the passwd command for my users. I let smbpasswd sync with the Linux passwd command. Here is my global global directives section:
Code:

[global]
  bind interfaces only = yes
  interfaces = eth0 lo
  domain master = yes
  preferred master = yes
  local master = yes
  browse list = yes
  dns proxy = yes
  wins support = yes
  security = user
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *New*password* %n\n *new*password* %n\n *Password*changed*
  server string = Samba %v on (%h)
  workgroup = inflections
  socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
  log file = /var/log/samba/%m.log
  log level = 1
  load printers = yes
  printing = cups
  printcap name = cups
  username map = /etc/samba/smbusers
  max log size = 5000
  os level = 65
  browseable = yes

It's entriely possible I'm missing the point of the problem you're having. I've just re-installed Oracle on my box for the 5th time today while I write up a testing spec for work and I'm sick of the sight of config files... :confused:

mdarby 01-07-2006 09:55 AM

yep, this is definately a samba issue, the firewall would have nothing to do with it.


All times are GMT -5. The time now is 09:28 AM.