LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-05-2006, 07:32 PM   #1
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

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

Last edited by scrupul0us; 01-05-2006 at 07:33 PM.
 
Old 01-05-2006, 07:46 PM   #2
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
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
 
Old 01-05-2006, 09:13 PM   #3
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Did you create the samba user account with smbpasswd?
Code:
smbpasswd -a <existing_system_username>
 
Old 01-05-2006, 09:20 PM   #4
centauricw
Member
 
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
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.
 
Old 01-06-2006, 04:30 PM   #5
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
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::
 
Old 01-06-2006, 04:42 PM   #6
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Did you restart samba? (/etc/rc.d/rc.samba stop/start)
 
Old 01-06-2006, 07:11 PM   #7
centauricw
Member
 
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
Also make sure that you have rights to view the directory and files under Linux. Samba compiles with the Linux file system security.
 
Old 01-07-2006, 12:29 AM   #8
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
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
 
Old 01-07-2006, 02:08 AM   #9
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Does the XP user have filesystem rights to the actual directory? Are they in the "write list" directive in smb.conf?
 
Old 01-07-2006, 02:23 AM   #10
canuck_barlow
Member
 
Registered: Dec 2004
Distribution: Fedora Core 5
Posts: 64

Rep: Reputation: 15
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?
 
Old 01-07-2006, 03:12 AM   #11
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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...
 
Old 01-07-2006, 10:55 AM   #12
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

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


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
Samba issues trebek Linux - Networking 3 04-28-2005 04:10 PM
samba issues cham0169 Linux - Software 1 04-11-2005 09:37 AM
samba issues feldux Linux - Networking 1 08-12-2004 12:06 PM
Samba Issues lflores Linux - Networking 20 09-25-2003 10:29 PM
Samba issues chris Linux - General 4 11-22-2001 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:43 PM.

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