SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-07-26 08:45:01

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Samba and network browsing

Hi there guys, I've read a few threads,

http://crunchbanglinux.org/forums/topic/242/view-lan/
http://crunchbanglinux.org/forums/topic … mba-share/

downloaded Samba, succesfully mounted the share in ~/network, however whenever I browse any computer, there're no files only the initial shared folders. Say I've shared Music and Downloads, I can see both those folders, but according to my #! samba config there're no files within both. Other PCs on the network are running Ubuntu and Windows 7.

Autostart.sh

# Start Networking and mount it in ~/network
sleep 5s && smbnetfs ~/network 

smbnetfs.auth

auth "WORKGROUP/hamish" "******"

smbnetfs.conf

#################################
#                               #
#  SMBNETFS sample config file  #
#                               #
#################################


#---------------------------------------------------------------------
# time_delta is a sleep time between checking for scheduled events. 
# Increase it if smbnetfs eat to much cpu without loading.
#
# Default: 5 sec
#---------------------------------------------------------------------
time_delta        5

#---------------------------------------------------------------------
# config_update_interval is a time interval before next reading of 
# config file 
#
# Default: 300 sec
#---------------------------------------------------------------------
config_update_interval    300

#---------------------------------------------------------------------
# SMBNetFs debug level. Most of people should not use debug level 
# greater then 6.
# Possible value: 0 <= smbnetfs_debug <= 10
#
# Default: 0
#---------------------------------------------------------------------
smbnetfs_debug        0

#---------------------------------------------------------------------
# Samba debug level
#
# Default: 0
#---------------------------------------------------------------------
smb_debug        0

#---------------------------------------------------------------------
# The time between workgroup refresh 
# 
# Default: 300 sec
#---------------------------------------------------------------------
smb_refresh_time    300

#---------------------------------------------------------------------
# The time to live of automatically founded computer/workgroup  
# 
# Default: (3 * refresh_time)
#---------------------------------------------------------------------
smb_name_ttl        900

#---------------------------------------------------------------------
# The maximun number of samba context. Reduse it if 
# smbnetfs eat a lot of memory
#
# Default: 15
#---------------------------------------------------------------------
smb_ctx_max        15

#---------------------------------------------------------------------
# The time between samba context refresh. This is used to preserve 
# samba connection alive. Reduse it if the connection closed by
# timeout often.
#
# Default: 300 sec
#---------------------------------------------------------------------
smb_ctx_refresh_time    300

#---------------------------------------------------------------------
# The maximum number of opened files.
#
# Default: 100
#---------------------------------------------------------------------
smb_open_files_max    100

#---------------------------------------------------------------------
# The maximum number of buffers to convert filenames to/from samba
# encoding.
#
# Default: 15
#---------------------------------------------------------------------
buf_count_max        15

#---------------------------------------------------------------------
# The maximum number of slice in array. Each slice is may contain up
# to 128 host/group/link entries. This value limit the amount of 
# memory allocated by all arrays. Please do not touch this value 
# unless you is a smbnetfs developer.
#
# Default: 1024
#---------------------------------------------------------------------
array_slice_max        1024

#---------------------------------------------------------------------
# This option define the free space size reported by SMBNetFS. This is
# mostly required for Nautilus (Gnome project), as it check the amount
# of free space before any write attempt. 
# WARNING!!! free_space_size = free_space_blocks * 4Kb. 
#
# Default: 0
#---------------------------------------------------------------------
free_space_blocks    0

#---------------------------------------------------------------------
# The maximum size of read/write block. The block size should be
# closed to 4Kb boundary. Currently libsmbclient does not support
# block_size >=  64Kb, so maximum possible block_size is 61440 (60Kb)
#
# Default: 32768
#---------------------------------------------------------------------
block_size        32768

#---------------------------------------------------------------------
# If quiet_flag enabled, then chown/chgroup will return succcess, else
# chmod/chown will always fail.
# Possible value: true, false, yes, no
#
# Default: true
#---------------------------------------------------------------------
quiet_flag        "true"

#---------------------------------------------------------------------
# If query_browsers disabled, then smbnetfs will show only static
# host/group/link.
# Possible value: true, false, yes, no
#
# Default: true
#---------------------------------------------------------------------
query_browsers        "true"

#---------------------------------------------------------------------
# If show_$_shares disabled, then smbnetfs will not show shares with $
# at the end.
# Possible value: true, false, yes, no
#
# Default: false
#---------------------------------------------------------------------
show_$_shares        "false"

#---------------------------------------------------------------------
# konqueror search for '.directory' subdir in any directory and its
# subdirectories. This slow a groups/shares listing. The value below 
# specify the number of path component checked for ".directory". Use
# the value of -1 to check all path component.
#
# Set kde_workaround to 3 or above if you browse SMBNetFs with 
# konqueror. Other people can use 0 value.
# Possible value: -1, 0, 1, 2, ...
#
# Default: "3"
#---------------------------------------------------------------------
kde_workaround        "3"

#---------------------------------------------------------------------
# Samba do not support truncate file operation. It's easy to emulate
# it if (new_size = 0) or (new_size >= old_size). Normally SMBNetFS
# will return error if (0 < new_size < old_size), but if unsafe_truncate 
# enabled, then SMBNetFS will delete old file and create new one of
# required size for this situation.
# Possible value: true, false, yes, no
#
# Default: false
#---------------------------------------------------------------------
unsafe_truncate        "false"

#---------------------------------------------------------------------
# SMBNetFS can perform Á finalize steps on umount. It can take a huge
# amount of time on buggy (unmaintained) network. It's wise to skip
# this steps unless perform debuging or searching memory leaks.
# Possible value: true, false, yes, no
#
# Default: true
#---------------------------------------------------------------------
fast_shutdown        "true"

#---------------------------------------------------------------------
# Local charset
#
# Default: autodetected
#---------------------------------------------------------------------
#local_charset        "koi8-r"    

#---------------------------------------------------------------------
# Charset used by samba
#
# Default: utf-8
#---------------------------------------------------------------------
#samba_charset        "utf-8"

#---------------------------------------------------------------------
# File to store SMBNETFS debug messages
#
# Default: print to stderr
#---------------------------------------------------------------------
#log_file        "/tmp/smbnetfs.log"

#---------------------------------------------------------------------
# Computer netbios name
#
# Default: ""
#---------------------------------------------------------------------
#netbios_name        ""

#---------------------------------------------------------------------
# Set auth information for samba network resource. If share name is 
# omited then the auth data applied to all computer "computer" shares.
# Omit "computer/share" to specify default auth patameters.
# 
# PS: You can use "cd mountpoint/domain:user:password@computer" 
# command to enter to remote computer as domain/workgroup 
# "domain_or_workgroup" user "user" with password "password".
#
# Syntax:
#    auth [computer[/share]] [domain_or_workgroup/]user password
#
# Default:
#    auth "user_login_name" ""
#
#---------------------------------------------------------------------
#auth            "guest" "" 

# read auth data from ~/.smb/smbnetfs.auth
include            "smbnetfs.auth"

#---------------------------------------------------------------------
# This section describe a static host/group/link.
#
#  host      computer_name
#  group  group_name
#  link   link_name        link_contents
#  link   group/link_name    [link_contents]
#---------------------------------------------------------------------

# read host/group/link from ~/.smb/smbnetfs.host
include            "smbnetfs.host"

smb.conf

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# 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 most of which 
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
# However, use this with caution if your smb.conf file contains nested
# "include" statements. See Debian bug #483187 for a case
# where using a master file is not a good idea.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# 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

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

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

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
#   security = user

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped 
# to anonymous connections
   map to guest = bad user

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
;   domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the 
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

########## Printing ##########

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

# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap

# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups

############ Misc ############

# 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 = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
#   socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
#   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares.  This will share each
# user's home directory as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
;   read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
;   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.  Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
# This might need tweaking when using external authentication schemes
;   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes
;   share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[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 = /var/spool/samba
   printable = yes
   guest ok = no
   read only = 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
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes

# The next two parameters show how to auto-mount a CD-ROM when the
#    cdrom share is accesed. For this to work /etc/fstab must contain
#    an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#    is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom

Offline

Help fund CrunchBang, donate to the project!

#2 2009-07-26 14:31:36

gwmiller
New Member
Registered: 2009-07-23
Posts: 4

Re: Samba and network browsing

I just installed Smb4k, and that's handled all my Windows/Samba connections without difficulty.

Jerry

Offline

#3 2009-07-26 14:48:43

DJiNN
#! Member
From: UK
Registered: 2009-04-23
Posts: 70

Re: Samba and network browsing

gwmiller wrote:

I just installed Smb4k, and that's handled all my Windows/Samba connections without difficulty.

Jerry

Unless you're using KDE, that's a heck of a lot of KDE deps to install for something that should be reasonably simple. Approx 110mb install just to get one computer to see another!!?  OUCH! wink

Last edited by DJiNN (2009-07-26 15:35:07)

Offline

#4 2009-07-26 15:21:13

Awebb
The Singularity
Registered: 2009-07-23
Posts: 2,812

Re: Samba and network browsing

The only way for me to get smb running under Ubuntu derivates at the moment, is fusesmb. There are several bugs (listed) around that issue.


I'm so meta, even this acronym

Offline

#5 2009-07-27 07:39:26

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

Ok, I've downloaded fusesmb, still didn't work however, I still can't see any files. Any ideas? A OS without filesharing isn't very useful too me sad This computer holds all my media, and am really keen to keep crunchbang on it!

Offline

#6 2009-07-27 08:22:51

Awebb
The Singularity
Registered: 2009-07-23
Posts: 2,812

Re: Samba and network browsing

Two simple scripts to be placed in your ~/bin/

# !/bin/bash
# sambaon
# samba-stuff in ~/network
mkdir ~/network
fusesmb ~/network/
# !/bin/bash
# sambaoff
# kill samba-stuff in ~/network
fusermount -u ~/network/
rm -rf ~/network

Don't forget to make them executable!

Now create yourself a hotkey/obmenu entry for both and enjoy.

EDIT: Are you sure it's the Ubuntu device causing the problem? Did you setup everything correctly in Win7? Firewall? Can you ping it?

Last edited by Awebb (2009-07-27 08:25:38)


I'm so meta, even this acronym

Offline

#7 2009-07-27 11:14:22

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

This place has 6 computers, I own 4 of them they are all sitting on this desk, I have direct access to all their settings. All are communicating within one another perfectly except CrunchBang, so I'm pretty sure it's it.

Ok I have the executables, haven't bothered mapping keys or placing a menu item as I still can't browse my ubuntu/vista/7 machines. Yes they're executable, I can see rm command at work when I exec sambaoff. I can also see my computers in the ~/network/WORKGROUP folder when i exec sambaon, but all shared folders contain no files...

Can I set samba up like I have it in my ubuntu/gnome/nautilus install? ie, using smb:/// for the network mount? I'm sort used to that, however right now I'll be content with just having a functional samba setup.

BTW, thanks for all you help Awebb, I appreciate this smile

Offline

#8 2009-07-27 12:23:25

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,485

Re: Samba and network browsing

you can actually use nautilus in openbox, here are instructions http://crunchbanglinux.org/forums/topic … r-openbox/ . That way you can still use the smb:/// protocal.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#9 2009-07-28 01:35:46

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

Hi there, thanks for that, but I'd like to keep using pcmanfm - But then again, I'd also like a working samba setup. Can anyone help further?

Offline

#10 2009-07-28 01:42:59

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

Oh - I guess I should probably mention that none of my computers can see my CrunchBang computer either. Like browsing the network that is.

EDIT: Progress! Ok, I installed samba 2:3.3.1, the same version as my Ubuntu install. And it worked. To an extent... I can now share files and folders and others can browse them, copy, use everything. However I STILL can't go the other way i.e browse other computers. Any ideas? I think it's because 2:3.3.1 is sharing, but I'm still trying to use fuse to see them - I'm unsure how to use 2:3.3.1 for browsing my network - can someone help? Short of suggesting that I use nautilus. I want to setup a sync between my desktop and laptop - but I need sharing to go both ways for this to be possible.

Thanks again to everyone who's helping smile

Last edited by aim (2009-07-28 04:11:48)

Offline

#11 2009-07-28 04:32:02

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

*bump* updated last post.

Offline

#12 2009-07-28 08:46:36

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

Ok, further progress has been made. Sorry about all these posts. But I keep making them in the hopes that someone realises what's wrong and can help me.

I have managed to copy something from my remote laptop. This proves that Samba is working but somehow is not mounted correctly or just displaying properly through PCmanfm, I think it is my mounting procedure or PCmanfm's setup that is somehow wrong. I still can't browse with PCmanfm. This is my only road block. Why can I not browse?

hamish@hamish-desktop:~$ smbclient //hamish-laptop/music -U hamish
Enter hamish's password: 
Domain=[HAMISH-LAPTOP] OS=[Unix] Server=[Samba 3.3.2]
smb: \> get "The Roots - The Seed 2.0.mp3"
getting file \The Roots - The Seed 2.0.mp3 of size 6307782 as The Roots - The Seed 2.0.mp3 (614.8 kb/s) (average 614.8 kb/s)
smb: \> 

However I am pleased to know I can communicate with other computers, there is hope!

Offline

#13 2009-07-28 11:28:14

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

More progress!

I'm close. I've managed to mount one folder.

hamish@hamish-desktop:~$ sudo mount -t cifs //192.168.1.8/music ~/hamish-laptop -o username=hamish,password=******

However, I can't browse shared folders still. How can I use cifs not to mount just individual shared folders, but a computer?

Offline

#14 2009-07-29 10:18:25

3s
New Member
Registered: 2009-07-29
Posts: 1

Re: Samba and network browsing

You could also install gnome-commander!

Offline

#15 2009-07-29 11:03:35

lillis
Member
From: Stockholm, Sweden
Registered: 2009-07-22
Posts: 37
Website

Re: Samba and network browsing

If I recall correctly, samba can only mount the actual shared folders, and not sub-folders of those. You should be able to reach them, but you cant mount them to a directory on your #! computer. But maybe I'm not understanding your problem correctly? If you just want to share your entire computer, why not share the C: disk instead of different folders?

Offline

#16 2009-07-29 23:47:36

shan2on
New Member
Registered: 2009-07-29
Posts: 3

Re: Samba and network browsing

similar problems here.

first off, this is my first post and hopefully not my last. I've used many distros starting from slackware 7.1 all the way to gentoo 2001.0 and even ubuntu 9.04 and now #!.

This is by far the most easiest and intuitive <u>minimalistic</u> approach to a user-friendly distro i've ever used, including netbsd.

Quick network overview:
machine 1> debian lenny amd64 kernel - used for web development and small sql interactions.  Samba is used here mainly for sharing ~/www, a symbolic link to /var/www.
machine 2> Windows 7, workgroup member with D drive shared, mainly used for gaming and file repos
machine 3> crunch 9.04, laptop used as a client and local development, my main machine really.

Problem:  Samba and overall network filesharing with crunchbang.

As said above, i'm a frequent linux user, in fact of all 6 machines in my house, only 1 is windows, and its a 7 box.  My other 2 ubuntu and debian machines are not a factor, as they are not as dependant on the LAN as much as i need.

now, regardless of filemanager, i cannot get my shares to stick.  And i think this lies with crunchbang solely.  With a ubuntu machine running nautilus as the default fm, i can browse subdirectories with ease, even if i fail to share the wrong "root" folder when applying the share on the client machine.

however with crunchbang, I can only view and share files on my crunchbox locally, and am not able to mount anything remotely (windows7 machine), using both

1> the mount command

sudo mount -t cifs //192.168.0.102/d /home/shan2on/nfs -o username=shan2on,password=******

2>gigolo, ran as standard user ... I can mount my locally samba shared folders, but not able to access anything else.  My D drive shows up, but i cannot browse its' subfolders.

3> running gksudo pyNeighborhood, just keeps scanning for shares. however, before with my laptop, i was able to access both C and D drives on my machine, after mounting them as root, then playing whichever episode of television i want via my samba share and wireless adapter i was able to stream via mplayer with ease.  However after a reboot of my windows machine, i am reluctant to share anything, but why can i view the root share and not it's subfolders ?


all of the recommended methods on this site and ubuntus' forums, i have followed and customized to my own, and in no way am i blaming the software, clearly this is a configuration error on  my part.

Could it be a dhcp inflicted error ?'

What about a keyring conflict ? Does the keyring save ip addresses and names  ?

or an amd64 kernel issue with network browsing  (or so i've read) ?


If i'm missing anything please let me know... do you need an smb.conf ? cause it is the default with home directories enabled.  And this is more of an smbclient problem, even though i cannot view my samba shares on my windows 7 machine either.

nevertheless :   /etc/samba/smb.conf


[global]
   workgroup = WERKGREWP
   server string = %h server (Samba, Ubuntu)
;   wins server = w.x.y.z
   dns proxy = no


#======================= Share Definitions =======================
[homes]
   comment = Home Directories
   browseable = yes
;   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S

any help is greatly appreciated

Offline

#17 2009-07-30 00:52:04

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

lillis wrote:

If I recall correctly, samba can only mount the actual shared folders, and not sub-folders of those. You should be able to reach them, but you cant mount them to a directory on your #! computer. But maybe I'm not understanding your problem correctly? If you just want to share your entire computer, why not share the C: disk instead of different folders?

Because if I shared C: drive, all I would see is a folder called C. And nothing in it. Anything I share, appears to #! as empty. Unless I manually mount it vis the terminal, which is why I'd like to mount C drive, but only view what I've shared. I don't want open access to everyone on the network.

Offline

#18 2009-07-30 01:40:57

shan2on
New Member
Registered: 2009-07-29
Posts: 3

Re: Samba and network browsing

Because if I shared C: drive, all I would see is a folder called C. And nothing in it. Anything I share, appears to #! as empty. Unless I manually mount it vis the terminal, which is why I'd like to mount C drive, but only view what I've shared. I don't want open access to everyone on the network.

Sad thing is, i dont share C:  ... And when i shared D: i saw its subfolders via pyNeighborhood, and even on my previous installs with ubuntu and nautilus, also on debian machines running gnome.

Offline

#19 2009-07-30 02:53:51

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

Have you tried installing nautilus shan2on?

EDIT: and use it with samba 2:3.3.2, its in the repos.

Last edited by aim (2009-07-30 02:54:25)

Offline

#20 2009-07-30 05:40:38

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,485

Re: Samba and network browsing

I know it doesn't fix your original problem but you could try use sshfs, more secure and pretty easy to set up. They even have an implementation for windows here http://digg.com/software/SSHFS_For_Windows. For #! it's in the repos, just install sshfs then:
sshfs username@ip_or_computer_name:/path/to/directory /mount/point
no need for sudo. Then to unmount
fusermount -u /mount/point/
you'll also have to install a ssh server on your windows machine but I know there are several out there.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#21 2009-07-31 04:02:00

aim
#! CrunchBanger
From: Christchurch, New Zealand
Registered: 2009-07-26
Posts: 227

Re: Samba and network browsing

Thanks iggykoopa. But I've managed to get it to work under nautilus. Flakey, but working.

Offline

#22 2009-07-31 17:56:32

shan2on
New Member
Registered: 2009-07-29
Posts: 3

Re: Samba and network browsing

I know it doesn't fix your original problem but you could try use sshfs, more secure and pretty easy to set up. They even have an implementation for windows here http://digg.com/software/SSHFS_For_Windows. For #! it's in the repos, just install sshfs then:
sshfs username@ip_or_computer_name:/path/to/directory /mount/point
no need for sudo. Then to unmount
fusermount -u /mount/point/


@iggykoopa:

this method seems to be somewhat failsafe.  thank you for your response.  i've now moved all my shares from my windows machine over to my #!box by way of your sshfs solution posted above.  now nfs is the primary means of transportation of data along my lan, making it easier, faster, and also bypassing a layer of unnecessary encryption (pam? tdbsam ?) nevertheless, nfs seems to be an easier choice in regards to streaming media on the lan.

thanks !

~ shan2on

Offline

#23 2009-07-31 18:32:00

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,485

Re: Samba and network browsing

nfs is a good solution too, it actually seems a little more reliable than sshfs. It seems for me like the connection drops sometimes with sshfs, but it's just so easy to mount whatever directory you want...doesn't need to be configured beforehand or anything.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#24 2009-09-29 02:06:27

tinee
New Member
Registered: 2009-02-12
Posts: 6

Re: Samba and network browsing

sorry to bring up old thread but i got nautilus to see my shared folder from windows but then i can open the files. For example my folder is full of movies and i cant play the files with vlc. Can someone help please?


**edit** solved..

here is how i did it thanks to this site: http://mytechnotes.wordpress.com/2007/0 … om-ubuntu/
instead of using their folder u can set it to anything u want hope it helps somebody smile


   1. install smbfs
         1. $sudo apt-get install smbfs
   2. use ‘mount’ to mount the file share
         1. for mount you need to create a local folder that will be the mount point for example create a folder test under /media
         2. then mount the share using
               1. $sudo mount -t smbfs -o username=myusername //192.168.0.10/sharename /media/test
               2. myusername – is a valid username on the windows machine
               3. the ip address is the ip of the windows machine
               4. sharename is the name given to the share on the windows machine
               5. This will prompt you for the passwor d- the password for myusername on the windows machine
               6. on successful password you will be able to see the contents of the sharedfolder under /media/test
               7. Note: if you this is the first time you are using sudo in this shell session or if sudo has timed out there will be two password prompts first for the sudo next for the share mount. you could avoid this by doing $sudo -v before doing the sudo mount
   3. to umount
         1. $sudo umount /media/test

Last edited by tinee (2009-09-29 03:22:30)

Offline

Help fund CrunchBang, donate to the project!

#25 2009-11-13 20:17:06

li72
New Member
Registered: 2009-05-26
Posts: 8

Re: Samba and network browsing

Hi

I just did the above (install smbfs etc) and when I run the mount command after being prompted for the smb password I get:

mount error (5): Input/output error
refer to the mount.cifs(8) manual page


Which I did but it didn't mention error 5 anywhere

Any suggestions?

Last edited by li72 (2009-11-13 20:18:23)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo