Samba config ... again!

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Samba config ... again!

Postby Zircoff on Fri Feb 01, 2008 4:16 pm

Folks

Appreciate your tolerance of this post, but I am another newbie having problems getting access to shares on my Mint machine from my XP machine via Samba.

I can see the server and the shares from the XP machine, but when I try and open them it says they are not accessible and there may be a permissions problem. I have the shares defined as public and they are browseable. If I try and map a drive to the share it tells me that the network path is invalid, even though I can see it when I browse the machine.

Sure its just a smb.conf issue. Be grateful for anyone's input.

BTW - what file extensions can I post here? apparently smb.conf is not allowed

Thanks
Zircoff
Level 1
Level 1
 
Posts: 7
Joined: Fri Feb 01, 2008 3:34 pm

Linux Mint is funded by ads and donations.
 

Re: Samba config ... again!

Postby deadguy on Fri Feb 01, 2008 4:35 pm

well, you may find what you need in this post: viewtopic.php?f=52&t=8765

also a good idea to check what your permissions are set to on the shared folder in mint.
you would want "others" set to read at least.
User avatar
deadguy
Level 5
Level 5
 
Posts: 710
Joined: Wed Aug 15, 2007 9:41 pm
Location: Illinois USA

Re: Samba config ... again!

Postby Zircoff on Sat Feb 02, 2008 9:45 am

Thanks for the pointers deadguy, still not able to connect to those damn shares though. :(

I checked the permissions on the share and they are set in samba to allow all unspecified users. The properties are checked for Public, Browseable and Available.

in the KDE Control Module, the share is set to enable Network File Sharing with the Simple Sharing option.

I have also created a new user on both the XP box and the Mint box with the username and password of test, but still not able to get access.

Not sure if anyone has time to take a look through the following extract from the smb.conf - I am sure the answer lies here.

Thanks in advance

#======================= Share Definitions =======================
;[homes]
; comment = Home Directories
browseable = yes
read only = no
guest only = yes
map to guest = Bad User
guest ok = yes
security = share
; create mask = 0600
; directory mask = 0700

;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[Projects]
case sensitive = no
strict locking = no
msdfs proxy = no
path = /home/mark/Projects
guest only = no
Zircoff
Level 1
Level 1
 
Posts: 7
Joined: Fri Feb 01, 2008 3:34 pm

Re: Samba config ... again!

Postby cmost on Sat Feb 02, 2008 12:59 pm

Hi! Are you sure you added Samba enabled users? It's not enough to simply have an account name on your Mint box the same as on your Windows box. You must explicitly add a Samba enabled user. Try this command:

$sudo smbpasswd –a username
New SMB password: ********
Retype new SMB password:********

(Where username & password match those on the Windows account you're using to access the Mint shares!) Post back your results. I'm fairly experienced with Samba as I use it on all my file servers. While Mint isn't exactly designed for use as a file server, I am certain I can help you get this setup the way you want. Good luck!
cmost
Level 4
Level 4
 
Posts: 398
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: Samba config ... again!

Postby Zircoff on Sat Feb 02, 2008 1:58 pm

Hi cmost

Thanks for taking the time to reply, and yes I had wondered about the Samba User thing. I have added my Windows user as a samba user as per your commands

Mark@Poseidon:~$ sudo smbpasswd -a Mark
New SMB password:
Retype new SMB password:
Added user Mark.
Mark@Poseidon:~$

But still when I try and access the Mint share from XP it gives me the same access denied message. Interestingly in the Samba GUI, there is a tab for users that I looked at before and tried adding myself there as a user, Seemed sensible and it took the user, but when I went back into that tab the user I added had disappeared.

Any further thoughts would be appreciated.

Is there perhaps a bare bones smb.conf that might get me started?

Thanks again
Zircoff
Level 1
Level 1
 
Posts: 7
Joined: Fri Feb 01, 2008 3:34 pm

Re: Samba config ... again!

Postby deadguy on Sat Feb 02, 2008 2:09 pm

on the mint machine, what are the permissions on the folder you are trying to share?
(not the samba permissions but the actual folder permissions)
this may or may not be what's wrong, but it's worth a look. just open the folder in mint,
right click, choose properties, then have a look at the permissions tab.
if "others" is set to read & write then it's probably a samba problem.
if "others" is set to forbidden change it to either read or read & write.

edit: I think I read your original post wrong. you can't see shares from windows
in mint? if that's the case please disregard this post.
Last edited by deadguy on Sat Feb 02, 2008 2:21 pm, edited 1 time in total.
User avatar
deadguy
Level 5
Level 5
 
Posts: 710
Joined: Wed Aug 15, 2007 9:41 pm
Location: Illinois USA

Re: Samba config ... again!

Postby cmost on Sat Feb 02, 2008 2:17 pm

Hmm, perhaps you can work from one of my smb.conf files. Please feel free to modify as you see appropriate. This one is being used on one of my main file servers and has functioned well for several years. I did modify it slightly to remove anything specific to my setup. Note, I always force username 'netuser' to ensure permissions don't go out of wack when I'm administering from the Linux side. What this means in laymen's terms is that no matter what user accesses the files, Samba will perform the requested actions as username 'netuser'. If you go with this scheme yourself, be sure to add 'netuser' as a Samba enabled user!! Also, you can modify the shares with any valid Samba option. All of my shares are governed by the shares outlined in the Global section. Also, you can add other shares. Be sure your shares actually exist on the Linux server (path name valid and available to the root user). Finally, be sure to restart samba when you're finished editing your smb.conf file. (Restart the computer or stop / start samba services). Good luck!

-------------------------------
# Samba Configuration File for FILESERVER-MAIN1
# This allows Linux to act like a Windows NT/2000 Server - for free!

[global]

# 1. Server Naming Options:
workgroup = WORKGROUP

# netbios name is the name you will see in "Network Neighborhood",
# but defaults to your hostname
netbios name = fileserver-main1

# server string is the equivalent of the NT Description field
server string = Linux Mint File Server
# server signing = Auto


# 2. Printing Options:
# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = lpstat

# printcap cache time, so samba will automatically load new cups printers
printcap cache time = 60

# 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, cups
printing = cups


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

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

# Set the log (verbosity) level (0 <= log level <= 10)
# log level = 3


# 4. Security and Domain Membership Options:
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
guest account = guest
guest ok = yes
restrict anonymous = no

# Allow users to map to guest:
# map to guest = Bad User

# 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
# Encrypted passwords are required for any use of samba in a Windows NT domain
# The smbpasswd file is only required by a server doing authentication, thus
# members of a domain do not need one.
encrypt passwords = yes


# 5. Browser Control and Networking Options:
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=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 = 192.168.12.2/24 192.168.13.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 = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
#remote announce = 192.168.1.255 192.168.2.44

# 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 = yes

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

# 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

# 6. Name Resolution Options:
# 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 built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = yes

#============================ Share Definitions ==============================
# max protocol = NT
# ldap ssl = No
# inherit acls = yes
inherit permissions = yes
create mask = 0744
directory mask = 0744
case sensitive = no
# msdfs proxy = no
read only = no
force user = netuser

[homes]
comment = Home Directories
browseable = no
# You can enable VFS recycle bin and on-access virus-scanning on a per
# share basis:
# Uncomment the next 2 lines (make sure you create a .recycle folder in
# the base of the share and ensure all users will have write access to it.
# For virus scanning, install samba-vscan-clamav and ensure the clamd service
# is running
# vfs objects = vscan-clamav recycle
# vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

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

#Uncomment the following 2 lines if you would like your login scripts to
#be created dynamically by ntlogon (check that you have it in the correct
#location (the default of the ntlogon rpm available in contribs)
#root preexec = /usr/bin/ntlogon -u '%u' -g '%g' -o %a -d /var/lib/samba/netlogon/
#root postexec = rm -f '/var/lib/samba/netlogon/%u.bat'

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
#[Profiles]
# path = /var/lib/samba/profiles
# browseable = no
# guest ok = yes
# writable = yes
# This script can be enabled to create profile directories on the fly
# You may want to turn off guest acces if you enable this, as it
# hasn't been thoroughly tested.
#root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e $PROFILE ];
#then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi
# If you want read-only profiles, fake permissions so windows clients think
# they have written to the files
# vfs objects = fake_perms

# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients or upload the printer driver to the
# server from Windows (NT/2000/XP). On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you have
# to use 'printcap name = cups' or swap the 'print command' line below
# with the commented one. Note that print commands only work if not using
# 'printing=cups'
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# to allow user 'guest account' to print.
guest ok = yes
printable = yes
create mask = 0700
# =====================================
# print command: see above for details.
# =====================================
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
# print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
# If you install drivers on the server, you will want to uncomment this so
# clients request the driver
use client driver = yes

# This share is used for Windows NT-style point-and-print support.
# To be able to install drivers, you need to be either root, or listed
# in the printer admin parameter above. Note that you also need write access
# to the directory and share definition to be able to upload the drivers.
# For more information on this, please see the Printing Support Section of
# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
#
# A special case is using the CUPS Windows Postscript driver, which allows
# all features available via CUPS on the client, by publishing the ppd file
# and the cups driver by using the 'cupsaddsmb' tool. This requires the
# installation of the CUPS driver (http://www.cups.org/windows.php)
# on the server, but doesn't require you to use Windows at all :-).
[print$]
path = /var/lib/samba/printers
write list = @adm root

# Settings suitable for Winbind:
# write list = @"Domain Admins" root
# force group = +@"Domain Admins"

# A useful application of samba is to make a PDF-generation service
# To streamline this, install windows postscript drivers (preferably colour)
# on the samba server, so that clients can automatically install them.
# Note that this only works if 'printing' is *not* set to 'cups'

[pdf-gen]
path = /var/tmp
printable = Yes
comment = PDF Generator (only valid users)
printing = bsd
#print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
lpq command = /bin/true

[DATA_DRIVE]
path = /mnt/hdc1/DATA_DRIVE/
comment = Home directory and personal data for network users

[MUSIC_DRIVE]
path = /mnt/hdc1/MUSIC_DRIVE/
comment = Collection of MP3 and other music files

[PUBLIC]
path = /mnt/hdc1/PUBLIC/
comment = Public folder for temporary storage of files

[VIDEO_DRIVE]
path = /mnt/hdc1/VIDEO_DRIVE/
comment = Multimedia and Video files

[HP_C5180]
printable = yes
printer name = HP_C5180
use client driver = yes
comment = Photorealistic all-in-one priter-copier
cmost
Level 4
Level 4
 
Posts: 398
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: Samba config ... again!

Postby Zircoff on Sat Feb 02, 2008 2:21 pm

Looks like its a Samba problem then

I have Owner, Group and Others all set "Can View and Modify Content" but it still wont let me in unfortunately :(
Zircoff
Level 1
Level 1
 
Posts: 7
Joined: Fri Feb 01, 2008 3:34 pm

Re: Samba config ... again!

Postby cmost on Sat Feb 02, 2008 3:12 pm

Zircoff wrote:Looks like its a Samba problem then

I have Owner, Group and Others all set "Can View and Modify Content" but it still wont let me in unfortunately :(


Can you elaborate on this comment? It sounds as though you're trying to set UNIX permissions for Samba shares. The permissions on the shares are only of concern as far as your Linux Mint host is concerned (e.g., Samba is orchestrated by root; and root has full access to all the files.) Samba permissions are orchestrated by Samba. If a samba enabled user named 'Mark' is present then he should be able to access workgroup shares with the directory mask applied to the Samba share. You might need a slight primer on Samba. Try out these resources:

Install Samba Server on Ubuntu (Mint)
http://www.howtogeek.com/howto/ubuntu/i ... on-ubuntu/

SAMBA (Domaincontroller) Server For Small Workgroups With Ubuntu 7.10 (should work with Mint 4.x Daryna)
http://www.howtoforge.com/ubuntu-gutsy- ... controller
cmost
Level 4
Level 4
 
Posts: 398
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: Samba config ... again!

Postby Zircoff on Sat Feb 02, 2008 3:16 pm

cmost wrote:Can you elaborate on this comment? I

Thanks cmost,

I was trying something suggested by deadguy with regards to permissions.

Thanks for the sample file. I will give it a try and post back the results.
Zircoff
Level 1
Level 1
 
Posts: 7
Joined: Fri Feb 01, 2008 3:34 pm

Re: Samba config ... again!

Postby ana on Sat Feb 16, 2008 3:23 pm

If you're using win xp home edition take a look at this: http://vowe.net/archives/001639.html

I tried but with no resualt.
User avatar
ana
Level 1
Level 1
 
Posts: 2
Joined: Sat Mar 03, 2007 5:05 pm
Location: Norway

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot], mintybits and 26 guests