Samba Configuration

Hi,
guys i tried to communicate with oracle installed on RHEL4
but not successfull
i am not being able to communicate ...
i think my samba configuration is causing problem
can sombody guide me
thanks.

Do you want to mount windows folder in linux and share your files?
Refer this article from my blog
[Mount Windows folder on Linux|http://kamranagayev.wordpress.com/2009/04/06/mount-windows-folder-on-linux/]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

Similar Messages

  • SAMBA configuration in unix- to install heterogeneous system

    HI all,
    i have sap 4.7 central instance(hp-ux,oracle 9.2.0.6) server.  i want to add
    one more dialog instance which is loaded on Windows.
    for this i need to configure samba ( to avoid unix case sensitive problem, and user authentication problem ).
    I want to know how to configure samba in my unix server. which version i need to download and where to download.
    Please let me know the procedure.
    Regards,
    satish kumar

    If you´ve installed it then you can use the howtos on the following site:
    http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/
    to configure it.
    Markus

  • Samba configuration on solarisintel 8

    hai i heve downloaded and installed samba server on my intel solaris 8 .. can any one help me to configure the server so that i can login from a widows desktop.
    help.. appriciated.
    konkani

    Modify the configuration file that resided in /usr/local/samba/lib/smb.conf
    For example:
    [global]
         workgroup =WORKGROUP
         netbios name = yourhostname
         default = global
         security = share
         encrypt passwords = yes
         server string = Samba V2.2.2
    [Shared_Folder]
         read list = guest,@guest
         writable = yes
         valid users = root,@root
         hide dot files = no
         path = /usr/local/src
         public = yes
    Of course, if you are want to join in Windows Domain, addional configure is necessary.

  • Samba Configuration Script

    Hi.
    Because i won´t edit my smb.conf manually, i search the web for a script, doing that for me.
    I found a  script  in the Kanotix-Linux wiki. I change it a little bit so it works with Arch Linux.
    I hope it will be usefull.
    #!/bin/bash
    # Sambaconf 3.0 for Kanotix
    # by Andreas Weber
    # 20.06.2004
    # [email protected]
    # http://www.it-weber.net/sambaconf
    function sudo_wrapper ()
    if [ $UID != 0 ]; then
    if [ -d /KNOPPIX ]; then
    exec sudo "$0" "$@" ||exit 1
    else
    if [ -n "$DISPLAY" ]; then
    if [ -f /usr/bin/kdesu -o -f /usr/kde/3.2/bin/kdesu ]; then
    kdesu "$0" "$@" ||exit 1
    else
    $DIALOG --title "$ProgName" --msgbox "You need to be root to run this Script." 10 35
    fi
    else
    echo -e "nnYou need to be root to run this Script.n"
    exit 1
    fi
    exit 100
    fi
    fi
    function dialog_wrapper ()
    XDIALOG_HIGH_DIALOG_COMPAT=1
    export XDIALOG_HIGH_DIALOG_COMPAT
    LANG=C
    export LANG
    DIALOG=dialog
    [ -n "$DISPLAY" ] && [ -x /usr/bin/Xdialog ] && DIALOG="Xdialog"
    function check_smb ()
    SMBINST=FALSE
    if [ -f /etc/rc.d/samba ]; then
    SMBINST=TRUE
    STARTSMB="/etc/rc.d/samba start"
    STOPSMB="/etc/rc.d/samba stop"
    RESTARTSMB="/etc/rc.d/samba restart"
    RELOADSMB="/etc/rc.d/samba reload"
    fi
    if [ "$SMBINST" = "FALSE" ]; then
    if [ -f /usr/sbin/smbd ]; then
    SMBINST=TRUE
    STARTSMB="/usr/sbin/smbd -D;/usr/sbin/nmbd -D"
    STOPSMB="killall -HUP smbd 2&>/dev/null;killall -HUP nmbd 2&>/dev/null"
    RESTARTSMB="$STOPSMB;$STARTSMB"
    RELOADSMB="$STOPSMB;$STARTSMB"
    else
    $DIALOG --title "ERROR" --msgbox "SAMBA not found.nnMaybe not installed." 20 50
    exit 1
    fi
    fi
    function inputbox ()
    $DIALOG --stdout --no-cancel --title "$ProgName" --inputbox "n$1nn" 20 "$2"
    function passwordbox ()
    $DIALOG --stdout --no-cancel --title "$ProgName" --passwordbox "n$1nn" 12 "$2"
    function askyn ()
    $DIALOG --title "$ProgName" --yesno "n$1n" $2 $3
    echo $?
    function splash ()
    $DIALOG --title "$ProgName" --msgbox "
    $ProgNamennAuthor:Andreas [email protected]://www.it-weber.com/smbconfnnn
    This Script is experimental. There will be no warranty. Use it at you own Risk!nnnPress OK to continue.nn " 20 50
    function check_live ()
    if [ -f /cdrom/KNOPPIX/KNOPPIX ]; then
    MODE=CDROM
    else
    MODE=HDD
    fi
    function get_plugin ()
    if [ ! -f "/opt/lib/kde3/ksambakonqiplugin.la" ]; then
    #if [ "$MODE" = "CDROM" ]; then
    pacman -S ksambaplugin
    #echo "Continue without plugin."
    #else
    #cd /var/cache/apt/archives
    #wget - http://www.it-weber.net/smbconf/download/v3.0/ksambaplugin_0.5-1_i386.deb
    # if [ ! -f "/var/cache/pacman/pkg/ksambaplugin-0.5b2-1.pkg.tar.gz" ]; then
    # $DIALOG --title "$ProgName" --msgbox "ERROR: Download of ksambaplugin failed." 10 50
    # exit 1
    # else
    $DIALOG --title "$ProgName" --msgbox "ksambplugin succsessfully installed"
    # fi
    fi
    function SMB_USER_CREATE ()
    if [ "$MODE" = "CDROM" ]; then
    SMB_USER=knoppix
    WIN_USER=$(inputbox "What is the Windows Username of $SMB_USERnnexample: webera." 50)
    if [ ! "$WIN_USER" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_USER=FAILED
    return
    fi
    SMB_PASS=$(passwordbox "Please type the Password for $SMB_USER:" 50)
    if [ ! "$SMB_PASS" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_USER=FAILED
    return
    fi
    echo "$SMB_USER=$WIN_USER" >> $UMAP
    smbpasswd -a $SMB_USER "$SMB_PASS"
    $DIALOG --title "$ProgName" --msgbox "$SMB_USER created." 10 50
    else
    SMB_USER=$(inputbox "Type the Username to create a Samba User:nnexample: webera." 50)
    if [ ! "$SMB_USER" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_USER=FAILED
    return
    fi
    cut -d: -f1 /etc/passwd |grep $SMB_USER
    if [ "$?" != "0" ]; then
    $DIALOG --title "$
    ProgName" --msgbox "$SMB_USER is not a known Linux User.nUser must be also exist as a Linux User." 10 50
    S_USER=FAILED
    return
    fi
    WIN_USER=$(inputbox "What is the Windows Username of $SMB_USERnnexample: webera." 50)
    if [ ! "$WIN_USER" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_USER=FAILED
    return
    fi
    SMB_PASS=$(passwordbox "Please type the Password for $SMB_USER:" 50)
    if [ ! "$SMB_PASS" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_USER=FAILED
    return
    fi
    echo "$SMB_USER=$WIN_USER" >> $UMAP
    smbpasswd -a $SMB_USER "$SMB_PASS"
    $DIALOG --title "$ProgName" --msgbox "$SMB_USER created." 10 50
    fi
    # create Administrator Account
    SMB_PASS=$(passwordbox "Please type the Password for root / Administrator:" 50)
    if [ ! "$SMB_PASS" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_USER=FAILED
    return
    fi
    echo "root=Administrator" >> $UMAP
    smbpasswd -a root "$SMB_PASS"
    $DIALOG --title "$ProgName" --msgbox "root / Administrator Account created." 10 50
    S_USER=OK
    function workgroup ()
    rm -f $CONF
    rm -f $UMAP
    rm -f $PMAP
    echo
    WKS=$(inputbox "Please type the Name of your Workgroup:nnexample: Kanotix-net." 50)
    if [ ! "$WKS" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_WKS=FAILED
    return
    fi
    echo "[global]" > $CONF
    echo " workgroup = $WKS" >> $CONF
    echo " netbios name = $HOSTNAME" >> $CONF
    echo " server string = host %h Version %v for %I" >> $CONF
    echo " security = user" >> $CONF
    echo " encrypt passwords = yes" >> $CONF
    echo " map to guest = Bad User" >> $CONF
    echo " username map = $UMAP" >> $CONF
    echo " smb passwd file = $PMAP" >> $CONF
    echo " socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192" >> $CONF
    echo " character set = ISO8859-1" >> $CONF
    echo " printcap name = cups" >> $CONF
    echo " load printers = yes" >> $CONF
    echo " printing = cups" >> $CONF
    echo " guest ok = yes" >> $CONF
    echo " " >> $CONF
    SMB_USER_CREATE
    if [ "$S_USER" = "FAILED" ]; then
    SMB_USER_CREATE
    fi
    ASK=$(askyn "Would you like to share the Homedrives?nnThis Shares will only available for the Owner." 10 50)
    if [ ! "$ASK" ]; then
    exit 1
    fi
    if [ "$ASK" = "0" ]; then
    echo "[homes]" >> $CONF
    echo " comment = Home Directories" >> $CONF
    echo " writeable = yes" >> $CONF
    echo " browseable = no" >> $CONF
    echo " dos filetimes = true" >> $CONF
    echo " valid users = %S" >> $CONF
    echo " read-only = no" >> $CONF
    echo " " >> $CONF
    fi
    ASK=$(askyn "Would you like to share your Printers?" 10 50)
    if [ ! "$ASK" ]; then
    exit 1
    fi
    if [ "$ASK" = "0" ]; then
    echo "[printers]" >> $CONF
    PUSER=$(inputbox "Please type the Userame of the Printer-Administrator:nnexample: Administrator or root." 50)
    if [ ! "$PUSER" ]; then
    $DIALOG --title "$ProgName" --msgbox "ERROR: Required field is blank." 10 50
    S_WKS=FAILED
    return
    fi
    echo " printer admin = $PUSER" >> $CONF
    echo " comment = ALL Printers" >> $CONF
    echo " browsable = no" >> $CONF
    echo " path = /var/tmp" >> $CONF
    echo " printable = yes" >> $CONF
    ASK=$(askyn "Would you like to restrict the nPrinters for known Users only?nnIf you answer no, all Users will have Access to your Printers." 15 50)
    if [ "$ASK" = "0" ]; then
    echo " public = no" >> $CONF
    else
    echo " public = yes" >> $CONF
    fi
    echo " writable = no" >> $CONF
    echo " create mode = 0700" >> $CONF
    echo "" >> $CONF
    fi
    $RESTARTSMB
    if [ "$MODE" = "CDROM" ]; then
    $DIALOG --title "$ProgName" --msgbox "Basic Configuration written and Samba started." 10 50
    else
    $DIALOG --title "$ProgName" --msgbox "Basic Configuration written and Samba started.nnTo handle the Shares please use ksambaplugin in kcontrol." 20 50
    fi
    S_WKS=OK
    function smb_killall ()
    $STOPSMB
    ps -ae |grep smbd
    if [ "$?" != "0" ]; then
    killall -HUP smbd 2&>/dev/null
    killall -HUP nmbd 2&>/dev/null
    fi
    function diff_config_start ()
    /usr/sbin/nmbd -D --configfile=$CONF
    /usr/sbin/smbd -D --configfile=$CONF
    function smb_restart ()
    $RESTARTSMB
    # Here start's the Script
    # Set ENV
    ProgName="Sambaconf 3.0"
    CONF=/etc/samba/smb.conf
    UMAP=/etc/samba/smbusers
    PMAP=/etc/samba/smbpasswd
    TMPF=/tmp/smb.tmp
    # Start the Function's
    dialog_wrapper
    sudo_wrapper
    splash
    check_live
    check_smb
    get_plugin
    workgroup
    if [ "$S_WKS" = "FAILED" ]; then
    workgroup
    else
    exit 0
    fi
    Sorry for this "large" post. but i´ve got no webspace to upload thsi script.

    Do you want to mount windows folder in linux and share your files?
    Refer this article from my blog
    [Mount Windows folder on Linux|http://kamranagayev.wordpress.com/2009/04/06/mount-windows-folder-on-linux/]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Configure Samba Server as per note 680617

    Hi,
    I am installing Dialog Instance on Windows. CI(ERP 6.0) and DB(Oracle) are in Unix.
    As per note 680617INST  APPl. Server in Heterogenous SAP System Environment, I am configuring Samba Server.
    in that note it has been mentioned as :-
    <b>On Unix, release the /usr/sap directory as SAPMNT. ( using SAMBA)</b>
       <i>--> is this to be  achieved in writing in config file       
           of samba .. if yes where ? need details. </i>
    <b>The user who is performing installation on the windows host as well as the <sapsid>adm and SAPService<SAPSID> Windows users created during the installation must have read and write authorization on this share directory and its subdirectories.</b>
        <i>--> How to achieve this. what we should do on the
            Unix side ?</i>
    My Best Regards
    Paguras
    Message was edited by:
            PAGURAS to add more clarity to the Question

    Paguras,
    Look for a file called smb.conf......../etc/samba is where i would look for it......................
    More details on samba config here............
    Samba uses /etc/samba/smb.conf as its configuration file. If you change this configuration file, the changes will not take effect until you restart the Samba daemon with the command service smb restart.
    The default configuration file (smb.conf) in Red Hat Linux 8.0 allows users to view their Linux home directories as a Samba share on the Windows machine after they log in using the same username and password. It also shares any printers configured for the Red Hat Linux system as Samba shared printers. In other words, you can attach a printer to your Red Hat Linux system and print to it from the Windows machines on your network.
    To specify the Windows workgroup and description string, edit the following lines in your smb.conf file:
    workgroup = WORKGROUPNAME
    server string = BRIEF COMMENT ABOUT SERVER
    Replace WORKGROUPNAME with the name of the Windows workgroup to which this machine should belong. The BRIEF COMMENT ABOUT SERVER is optional and will be the Windows comment about the Samba system.
    To create a Samba share directory on your Linux system, add the following section to your smb.conf file (after modifying it to reflect your needs and your system):
    [sharename]
    comment = Insert a comment here
    path = /home/share/
    valid users = tfox carole
    public = no
    writable = yes
    printable = no
    create mask = 0765
    The above example allows the users tfox and carole to read and write to the directory /home/share, on the Samba server, from a Samba client.
    Samba Passwords
    In Red Hat Linux 8.0 encrypted passwords are enabled by default because it is more secure. If encrypted passwords are not used, plain text passwords are used, which can be intercepted by someone using a network packet sniffer. It is recommended that encrypted passwords be used.
    The Microsoft SMB Protocol originally used plaintext passwords. However, Windows 2000 and Windows NT 4.0 with Service Pack 3 or higher require encrypted Samba passwords. To use Samba between a Red Hat Linux system and a system with Windows 2000 or Windows NT 4.0 Service Pack 3 or higher, you can either edit your Windows registry to use plaintext passwords or configure Samba on your Linux system to use encrypted passwords. If you choose to modify your registry, you must do so for all your Windows NT or 2000 machines — this is risky and may cause further conflicts.
    To configure Samba on your Red Hat Linux system to use encrypted passwords, follow these steps:
       1.
          Create a separate password file for Samba. To create one based on your existing /etc/passwd file, at a shell prompt, type the following command:
          cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
          If the system uses NIS, type the following command:
          ypcat passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
          The mksmbpasswd.sh script is installed in your /usr/bin directory with the samba package.
       2.
          Change the permissions of the Samba password file so that only root has read and write permissions:
          chmod 600 /etc/samba/smbpasswd
       3.
          The script does not copy user passwords to the new file. To set each Samba user's password, use the command (replace username with each user's username):
          smbpasswd username
          A Samba user account will not be active until a Samba password is set for it.
       4.
          Encrypted passwords must be enabled in the Samba configuration file. In the file smb.conf, verify that the following lines are not commented out:
          encrypt password = yes
          smb passwd file = /etc/samba/smbpasswd
       5.
          Make sure the smb service is started by typing the command service smb restart at a shell prompt.
       6.
          If you want the smb service to start automatically, use ntsysv, chkconfig, or Services Configuration Tool to enable it at runtime. Refer to Chapter 13 for details.
    Tip     Tip
    Read /usr/share/doc/samba-<version>/docs/htmldocs/ENCRYPTION.html to learn more about encrypted passwords. (replace <version> with the version number of Samba that you have installed).
    The pam_smbpass PAM module can be used to sync users' Samba passwords with their system passwords when the passwd command is used. If a user invokes the passwd command, the password he uses to log in to the Red Hat Linux system as well as the password he must provide to connect to a Samba share are changed.
    To enable this feature, add the following line to /etc/pam.d/system-auth below the pam_cracklib.so invocation:
    password required /lib/security/pam_smbpass.so nullok use_authtok try_first_pass
    Hope that helps
    Ravi Raman

  • New to Solaris, Some Samba and NTFS issues.

    Hi Im new to solaris and trying out ZFS which has been great.
    Im haivng some trouble that I cant find up to date info on so here goes:
    First how do you mount an NTFS volume in Solaris 11 Express?
    I need to access the data on an NTFS drive to populate my new ZFS tank.
    Secondly, I have read only access on my samba shares from windows machines but my smb.conf looks right. a copy of my smb.conf will follow
    Any suggestions would be appreciated.
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = WORKGROUP
    # server string is the equivalent of the NT Description field
    server string = Samba Server
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = share
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    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/samba/log/log.%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 = smbpasswd
    # 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/sfw/lib/smb.conf.%m
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    #============================ Share Definitions ==============================
    [homes]
    comment = Home Directories
    browseable = no
    writable = yes
    # Un-comment the following and create the netlogon directory for Domain Logons
    ; [netlogon]
    ; comment = Network Logon Service
    ; path = /usr/sfw/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
    writable = no
    printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = no
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    [Series]
    comment = TV Series
    path = /home/Kirby/Series
    public = yes
    only guest = yes
    writable = yes
    printable = no

    875739 wrote:
    Hi Im new to solaris and trying out ZFS which has been great.
    Im haivng some trouble that I cant find up to date info on so here goes:
    First how do you mount an NTFS volume in Solaris 11 Express?
    I need to access the data on an NTFS drive to populate my new ZFS tank.I never had a need for it but I think you'll have to compile fuse ntfs-3g manually.
    http://web.archiveorange.com/archive/v/u46DbWSGcIzl7pexf4hQ
    >
    Secondly, I have read only access on my samba shares from windows machines but my smb.conf looks right. a copy of my smb.conf will follow
    Any suggestions would be appreciated.You don't need to use Samba in Solaris 11 Express.
    http://download.oracle.com/docs/cd/E19963-01/html/821-1448/gaynd.html#gayne

  • [SOLVED] Share Multiple Directories With Samba On Arch Linux and XP

    Hello,
    I have had the worst luck so far with Samba, which is far more likely because of an error on my part than on Samba's.
    I can only seem to share one directory regardless of how I setup my smb.conf. And worse yet, if I mess with Samba, smb.conf, after the first time I set it up it doesn't work again until I reinstall my OS. Now I'm sure that reinstalling isn't the only option, but I haven't figured out how to make it work again any other way. I've tried uninstalling it, deleting it from the cache, deleting /etc/samba and so on, still can't connect to it from XP when I reinstall it.
    I'm running Arch64 and I want to share some directories with a laptop running Windows XP.
    I want to share my home folder, but have it accessible from XP only by me, share my mother's home folder, and have it accessible on XP only by her (well actually I guess it needs to be accessible by both, since i'm the admin), share my media-server (a collection of five hard drives where I store movies and such), and have it read/write by both of us. And finally share /srv so I can work on that from the XP computer as well. I think that's all. And I would like to share printers between the two computers. I would also like to access XP files from here.
    I've always been able to get the media-server to share, but that's it, nothing else. And it doesn't always work right. It doesn't seem to want to follow sym links, but like I say if I mess with it it will stop working all together. So I'm not sure what to do.
    A thought was to instead make a /media/samba-share directory and share that, and inside it have symlinks to my home, media-server, etc. However, that will only work if samba will follow symlinks for me.
    Here is the smb.conf I am planning to use at the moment:
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = MEDIA-SERVER
    netbios name = Avalon
    encrypt passwords = true
    # server string is the equivalent of the NT Description field
    server string = Samba Server
    # Symlinks
    follow symlinks = yes
    wide symlinks = yes
    unix extensions = no
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = user
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    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.log
    # 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
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    include = /etc/samba/usershare.conf
    #============================ Share Definitions ==============================
    [homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    [media-server]
    comment = Media Server
    path = /media/media-server
    browseable = yes
    writable = yes
    printable = yes
    valid users = theavataroftime, christina
    follow symlinks = yes
    [theavataroftime]
    comment = The Avatar of Time's Home Directory
    path = /home/theavataroftime
    browseable = yes
    writable = yes
    printable = yes
    valid users = theavataroftime
    follow symlinks = yes
    [christina]
    comment = Christina's Home Directory
    path = /home/christina
    browseable = yes
    writable = yes
    printable = yes
    valid users = christina
    follow symlinks = yes
    [server]
    comment = Server
    path = /srv
    browseable = yes
    writable = yes
    printable = yes
    valid users = theavataroftime, christina
    follow symlinks = yes
    # 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 = yes
    Set public = yes to allow user 'guest account' to print
    guest ok = yes
    writable = no
    printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = yes
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    Now I wouldn't think I would need to list my home and mom's home seperately, but since [homes] has never worked for me in the past i thought i would give it a try. Does this look like something that would do what I am wanting?
    Otherwise I would delete [homes], [media-server], [theavataroftime], [christina], and [server] and replace them with just [samba-share] with all those as symlinks inside that directory as before mentioned.
    Anyway, thanks for the help. Any good guide on this matter would be appreciated, I have looked at several, but more can't hurt . Networking isn't my thing so to speak, so please be specific in any explanations. Thanks again.
    Last edited by The Avatar of Time (2009-03-02 03:38:12)

    Well it seems that my trouble all started when I began using the 'printable = yes' option for shares. Since I removed that the troubles seem to have left me.
    Does anyone know why that is listed as on option in smb.conf here:
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = yes
    ; printable = no
    ; write list = @staff
    As well as in a few other examples if it doesn't work? I seen the example and assumed that option was needed to print from those shared directories.
    Also, it seems that the comma is not needed between the 'valid users' names.
    Also, I guess it wasn't Windows XP's fault either but rather my own ignorance. I like the idea of blaming Windows better though.....
    I hope this servers to help others to aviod my mistakes.

  • Map linux shared folders to Z drive in Windows Client. Unable to login through Samba Server

    Hi,
    I am trying to map my linux machine to a network drive Z in Windows 7 . I added user guid in smbusers and created a password for this user through smbpasswd . Started Samba server on linuc, but when trying to create a network drive, it is asking for the login. I used credentials as GUID/<CREATEDPWD> . Not able to login with these credentials. Am I missing something. My Domain is ORADEV. I attached related files smb.conf,lmhosts,smbusers  files. Please let me know if i am not configuring samba server correctly.
    Here is the sm.conf file Details :
    # 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 (perhaps too
    # many!) most of which are not shown in this example
    # 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 = NT-Domain-Name or Workgroup-Name
       workgroup = ORADEV
    # server string is the equivalent of the NT Description field
       server string = %L (ST Samba Host), RedHat AS %v
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ;   hosts allow = 192.168.1. 192.168.2. 127.
    # if you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    #   printcap name = /etc/printcap
    #   load printers = yes
    # 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
    #   printing = lprng
    # Uncomment this if you want a guest account, you must add this to /etc/passwd
    # otherwise the user "nobody" is used
      guest account = adoddi
    # 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 = 0
    # Security mode. Most people will want user level security. See
    # security_level.txt for details.
       security = server
    # 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 =Samba Server
    # Password Level allows matching of _n_ characters of the password for
    # all combinations of upper and lower case.
    ;  password level = 8
    ;  username level = 8
    # 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
       smb passwd file = /etc/samba/smbpasswd
    # The following is needed to keep smbclient from spouting spurious errors
    # when Samba is built with support for SSL.
    ;   ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt
    # The following are needed to allow password changing from Windows to
    # update the Linux sytsem password also.
    # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
    # NOTE2: You do NOT need these to allow workstations to change only
    #        the encrypted SMB passwords. They allow the Unix password
    #        to be kept in sync with the SMB password.
    ;  unix password sync = Yes
    ;  passwd program = /usr/bin/passwd %u
    ;  passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
    # Unix users can map to different SMB User names
    ;  username map = /etc/samba/smbusers
    # 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 = /etc/samba/smb.conf.%m
    # This parameter will control whether or not Samba should obey PAM's
    # account and session management directives. The default behavior is
    # to use PAM for clear text authentication only and to ignore any
    # account or session management. Note that Samba always ignores PAM
    # for authentication in the case of encrypt passwords = yes
    ;  obey pam restrictions = yes
    # Most people will find that this option gives better performance.
    # See speed.txt and the manual pages for details
       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=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
    # 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 = no
    # 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 = no
    # 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 = 130.35.62.34
    # 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 = no
    # Case Preservation can be handy - system default is _no_
    # NOTE: These can be set on a per share basis
    ;  preserve case = no
    ;  short preserve case = no
    # Default case is normally upper case for all DOS files
    ;  default case = lower
    # Be very careful with case sensitivity - it can break things!
    ;  case sensitive = no
    #============================ Share Definitions ==============================
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    [ade]
      comment = ADE Directory
      path = /ade_global/
      public = no
      writable = yes
    [homes]
       comment = Home Directories (UNIX Home Dirs auto_home)
       browseable = no
       writable = yes
       valid users = %S
       create mode = 0664
       directory mode = 0775
    # If you want users samba doesn't recognize to be mapped to a guest user
    map to guest = bad user
    security = user
    # 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
    #   writable = no
    #   printable = yes
    # This one is useful for people to share files
    [tmp]
       comment = Temporary file space on %L
       path = /tmp
       read only = no
       public = yes
    # This is for the /private dir
    [private]
       comment = /private file space on %L
       path = /private
       read only = no
       public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ;   comment = Public Stuff
    ;   path = /home/samba
    ;   public = yes
    ;   writable = yes
    ;   printable = no
    ;   write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ;   comment = Fred's Printer
    ;   valid users = fred
    ;   path = /home/fred
    ;   printer = freds_printer
    ;   public = no
    ;   writable = no
    ;   printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ;   comment = Fred's Service
    ;   path = /usr/somewhere/private
    ;   valid users = fred
    ;   public = no
    ;   writable = yes
    ;   printable = no
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    [public]
       path =: /usr/somewhere/else/public
       public = yes
       only guest = yes
       writable = yes
       printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ;   comment = Mary's and Fred's stuff
    ;   path = /usr/somewhere/shared
    ;   valid users = mary fred
    ;   public = no
    ;   writable = yes
    ;   printable = no
    ;   create mask = 0765
    Here  is the smbusers file : adoddi is my GUID
    # Unix_name = SMB_name1 SMB_name2 ...
    root = administrator admin
    nobody = guest pcguest smbguest
    adoddi = adoddi
    lcmHosts File :
    127.0.0.1 localhost

    Hi,
    To clarify a couple of things:
    1- "reverse-route" does not have anything to do with this issue, the problem relies on the Windows 7 machine.
    2- Do you connect with an Admin account (Windows admin)?
    3- Do you run the VPN client as an administrator?
    4- Have you tried to disable any AV or software protection on the machine (just for testing).?
    Let me know.
    Portu.
    Please rate any helpul posts
    Message was edited by: Javier Portuguez

  • [SOLVED]Samba not working despite all my efforts

    Hi all, this be my first post ever.
    I am somewhat of a noob, jumped over to arch64 after ubuntu about a month ago, so please bear with me if I seem a little "behind".
    I've spent probably a total of 24 hours trying to get my Samba shares available to my other housemates.  They can see the shares, but cannot mount them (windows and linux).  All I want is for a public share to be writable, everything else read-only and the security to be "share" (I don't want unix accounts for each of my housemates, and this would be annoying for anyone else who drops in with their laptops).  I've trolled the internet for every how-to guide and nothing seems to work.  What is further annoying is that one of my housemates also runs arch and his (near) exact smb.conf doesn't work for me.
    Anyway, to business.  My smb.conf:
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = HOUSEOTDAMNED
    # server string is the equivalent of the NT Description field
    server string = ***
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = share
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    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.log
    # 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
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    #============================ Share Definitions ==============================
    ;[homes]
    ; comment = Home Directories
    ; browseable = no
    ; writable = yes
    # 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 = yes
    public = yes
    guest ok = yes
    writable = no
    printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = yes
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    [public]
    path = /home/***/Data/public/
    public = yes
    guest ok = yes
    only guest = yes
    guest account = nobody
    browsable = yes
    writable = yes
    printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    The group "nobody" does exist in /etc/group.  I have also made sure that "public" has 777 permissions.  The others shares aren't here as I kinda figured as one works, the others would follow suit when I add them.
    If it helps, my rc.conf daemons and modules:
    MOD_AUTOLOAD="yes"
    #MOD_BLACKLIST=() #deprecated
    MODULES=(vboxdrv usblp acpi_cpufreq cpufreq_ondemand cpufreq_powersave fuse)
    DAEMONS=(@syslog-ng @alsa @cpufreq hal fam gdm !network @crond @portmap @networkmanager @samba @netfs @cups @ntpd @xinetd)
    For what it's worth, I don't think my housemate uses networkmanager.
    Any help would be greatly appreciated, this is driving me insane.  Please let me know if any more info would help also.
    Thanks!
    Last edited by o1911 (2009-05-15 09:35:13)

    That did it- thank you very much!
    edit: not sure how to put [SOLVED] in the topic...
    Last edited by o1911 (2009-05-15 08:36:39)

  • Samba problems between two linux computers

    I have a laptop with arch with this smb.conf
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = WORKGROUP
    # server string is the equivalent of the NT Description field
    server string = Samba Server
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = user
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    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.log
    # 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
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    #============================ Share Definitions ==============================
    wins support = no
    [homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    # 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 = yes
    # Set public = yes to allow user 'guest account' to print
    guest ok = no
    writable = no
    printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = no
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    [Themes]
    path = /home/du/Themes
    available = yes
    browsable = yes
    public = yes
    writable = yes
    and another pc with ubuntu with this 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 <<[email protected]> 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 director as \\server\username
    [homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    # 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 = no
    # 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
    # The following parameter makes sure that only "username" can connect
    # 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 = yes
    ; create mask = 0600
    ; directory mask = 0700
    [printers]
    comment = All Printers
    browseable = yes
    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
    [Downloads]
    path = /home/Duccio/Downloads
    available = yes
    browseable = yes
    guest ok = yes
    public = yes
    writable = yes
    Both have static ip
    The problem are 2:
    1- the pc cant see eachothers with nautilus under "network" but..
    2- if i type in nautilus in the address bar from the arch pc "smb://ubuntu_ip" i can see shared folders the shared folder in ubuntu pc /home/Duccio/Downloads is browseable but i cant mount folders, the message is "unable to mount location"
    Another pc with ubuntu wich have dhcp is visible under nautilus network
    Last edited by jacopastorius82 (2010-11-02 21:14:51)

    in laptop pc with arch i have installed somewhat in gnome under System-->administration called "shared folder". Maybe this sort of software override manual configuration in /etc/samba/smb.conf?
    Something like that is probably standing in ubuntu as well i suppose..
    Last edited by jacopastorius82 (2010-11-03 22:13:53)

  • My Samba server stopped working and I have no idea why.

    I set up a samba server once I got arch installed and it was working like a boss for about a month. Then one day (i think the machine may have rebooted) it just stopped working. I can't access my samba share from any of my other machines (all running Windows 7). I hadn't changed anything so I don't know what the culprit is. I did some update and looked at the smb.conf file but everything seems to be in order. I also tried to connect with smbclient from the machine itself and I get an NT_STATUS_CONNECTION_REFUSED error.
    What's going on?
    Here is my smb.conf
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = WORKGROUP
    # server string is the equivalent of the NT Description field
    server string = Vault Samba Server
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = share
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    ; 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.log
    # 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
    # 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.1.109
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    #============================ Share Definitions ==============================
    [homes]
    comment = Home Directories
    browseable = no
    writable = yes
    # 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
    ; writable = no
    ; printable = yes
    [proraid]
    comment = ProRaid Share
    path = /proraid
    public = yes
    available = yes
    brosable = yes
    read only = no
    writable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = no
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765

    Hi,
    My thought is to check the current IP of the server, as your smb.conf has the line interfaces = 192.168.1.109 which means samba will only listen on that interface for requests. If the IP of the server has changed, that would explain why samba isn't working.

  • [Solved] Samba log spam: Unable to connect to CUPS server

    Hi everyone,
    I'm running into an annoying issue with samba. I don't have any printers installed, and probably won't. However smbd complains to no end in /var/log/errors.log about not being able to connect to a cups server:
    Apr 18 12:30:05 asakura nmbd[4361]: *****
    Apr 18 12:30:05 asakura nmbd[4361]:
    Apr 18 12:30:05 asakura nmbd[4361]: Samba name server ASAKURA is now a local master browser for workgroup MYGROUP on subnet 192.168.1.121
    Apr 18 12:30:05 asakura nmbd[4361]:
    Apr 18 12:30:05 asakura nmbd[4361]: *****
    Apr 18 12:32:22 asakura smbd[4552]: [2009/04/18 12:32:22, 0] printing/print_cups.c:cups_connect(103)
    Apr 18 12:32:22 asakura smbd[4552]: Unable to connect to CUPS server localhost:631 - Connection refused
    Apr 18 12:32:22 asakura smbd[4553]: [2009/04/18 12:32:22, 0] printing/print_cups.c:cups_connect(103)
    Apr 18 12:32:22 asakura smbd[4553]: Unable to connect to CUPS server localhost:631 - Connection refused
    Those last two lines get spammed constantly.
    I've done a little bit of research into the matter, and followed the steps here to try to resolve the problem: http://www.davekb.com/browse_computer_t … server:txt
    Unfortunately it doesn't appear to make any difference.
    Here is my /etc/samba/smb.conf:
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = MYGROUP
    # server string is the equivalent of the NT Description field
    server string = Samba Server
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = user
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    load printers = no
    # 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.log
    # 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
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    #============================ Share Definitions ==============================
    ; [homes]
    ; comment = Home Directories
    ; browseable = no
    ; writable = yes
    # 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
    ; writable = no
    ; printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = yes
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    [shared]
    path = /media/shared
    valid users = foosoft
    public = no
    writable = yes
    [tomato]
    path = /media/data1/tomato
    valid users = foosoft
    public = no
    writable = yes
    show add printer wizard = no
    printing = none
    printcap name = /dev/null
    disable spoolss = yes
    I'm totally out of ideas here, anyone have a tip on what I could try next?
    Last edited by FooSoft (2009-04-18 19:52:28)

    glad you posted it first i had the same problem.
    However, samba was complaining that
    printing = none
    was invalid. I removed that line and it works great.
    thanks
    Last edited by lio (2009-10-16 00:20:14)

  • [SOLVED] Trying to get samba to work, smbtree issues:

    I am having a bit of an issue getting my computer to show up to my Mint laptop.  Running smbtree as it stands right now produces this output:
    Enter mikeyd's password:
    WORKGROUP
    \\MINT mint server (Samba, LinuxMint)
    \\MINT\IPC$ IPC Service (mint server (Samba, LinuxMint))
    \\MINT\print$ Printer Drivers
    Here is my smb.conf file:
    http://pastebin.com/M5neuVPt
    # 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 (perhaps too
    # many!) most of which are not shown in this example
    # 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]
    usershare path = /var/lib/samba/usershares
    usershare max shares = 100
    usershare allow guests = yes
    usershare owner only = False
    # workgroup = NT-Domain-Name or Workgroup-Name
    workgroup = WORKGROUP
    # server string is the equivalent of the NT Description field
    server string = %h server (Samba, ArchBoxMTD)
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # if you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    printcap name = /etc/printcap
    load printers = yes
    # 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
    ; printing = bsd
    # 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.log
    # Put a capping on the size of the log files (in Kb).
    max log size = 50
    # Security mode. Most people will want user level security. See
    # security_level.txt for details.
    security = user
    # Use password server option only with security = server
    ; password server = <NT-Server-Name>
    # Password Level allows matching of _n_ characters of the password for
    # all combinations of upper and lower case.
    ; password level = 8
    ; username level = 8
    # 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
    ; smb passwd file = /etc/samba/smbpasswd
    # The following are needed to allow password changing from Windows to
    # update the Linux sytsem password also.
    # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
    # NOTE2: You do NOT need these to allow workstations to change only
    # the encrypted SMB passwords. They allow the Unix password
    # to be kept in sync with the SMB password.
    ; unix password sync = Yes
    ; passwd program = /usr/bin/passwd %u
    ; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
    # Unix users can map to different SMB User names
    ; username map = /etc/samba/smbusers
    # 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 = /etc/samba/smb.conf.%m
    # 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
    # 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
    # Use only if you have an NT server on your network that has been
    # configured at install time to be a primary domain controller.
    ; domain controller = <NT-Domain-Controller-SMBName>
    # 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
    # All NetBIOS names must be resolved to IP Addresses
    # 'Name Resolve Order' allows the named resolution mechanism to be specified
    # the default order is "host lmhosts wins bcast". "host" means use the unix
    # system gethostbyname() function call that will use either /etc/hosts OR
    # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
    # and the /etc/resolv.conf file. "host" therefore is system configuration
    # dependant. This parameter is most often of use to prevent DNS lookups
    # in order to resolve NetBIOS names to IP Addresses. Use with care!
    # The example below excludes use of name resolution for machines that are NOT
    # on the local network segment
    # - OR - are not deliberately to be known via lmhosts or via WINS.
    ; name resolve order = wins lmhosts bcast
    # 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 = no
    # Case Preservation can be handy - system default is _no_
    # NOTE: These can be set on a per share basis
    ; preserve case = no
    ; short preserve case = no
    # Default case is normally upper case for all DOS files
    ; default case = lower
    # Be very careful with case sensitivity - it can break things!
    ; case sensitive = no
    #============================ Share Definitions ==============================
    [homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    public = yes
    path = /home/mikeyd
    guest ok = yes
    share modes = yes
    # Un-comment the following and create the netlogon directory for Domain Logons
    ; [netlogon]
    ; comment = Network Logon Service
    ; path = /home/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 = /home/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
    writable = no
    printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; read only = yes
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %u option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    On the mint laptop, it can see its own share as well.
    This is my /etc/hostname output
    archboxmtd
    This might help too:
    mikeyd@archboxmtd ~ $ net usershare info
    [Videos]
    path=/home/mikeyd/Videos
    comment=
    usershare_acl=Everyone:F,
    guest_ok=y
    I have tried to get things working by following:
    https://wiki.archlinux.org/index.php/Samba
    https://wiki.archlinux.org/index.php/Sa … leshooting
    Hopefully that gives you helpful uber dudes something to go on.
    Thank you for any help you can give.  I am pretty technical, but have been away from Arch and smb for a while.  I should be able to follow any suggestions fine.
    Thanks!
    Last edited by degmic71 (2013-07-09 00:30:38)

    Answered my own question, nmdb was the culprit.... dang, well saving this page for future ref:
    This did it:
    Starting the service
    Start/enable Samba via the smbd and nmbd at boot:
    systemctl enable smbd.service
    systemctl enable nmbd.service
    Run them right now as well (otherwise you'd have to reboot):
    systemctl start smbd.service
    systemctl start nmbd.service
    Swat is a nice web interface too

  • Sharing with Samba

    Hey all !
    I've been for the past two days trying to configure my smb.conf so it shares files over network.
    I've read docs, wikis, how-tos, theads et cetera but I just can't make the whole thing work.
    I want Movies and Musics to be read only. This works fine.
    The problem is Repo. I want it to be read/write. I've chmoded /media/Elements/Repo 777 but it still not works. What I get is read only access.
    Here's my actual smb.conf so you can help me figure out what's wrong with it :
    # 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 (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. This may be obtained from:
    # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
    # Many working examples of smb.conf files can be found in the
    # Samba-Guide which is generated daily and can be downloaded from:
    # http://www.samba.org/samba/docs/Samba-Guide.pdf
    # 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 = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = WORKGROUP
    # server string is the equivalent of the NT Description field
    server string = Samba Server
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = share
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    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 = nobody
    # 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
    # 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
    # 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
    logon home = \\%25N\%25U
    logon path = \\%25N\%25U\profile
    # 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
    [Movies]
    path = /media/Elements/Videos/Movies
    guest ok = yes
    [Music]
    path = /media/Elements/Sounds/Music
    guest ok = yes
    [Repo]
    path = /media/Elements/Repo
    guest ok = yes
    read only = no
    Any idea ?
    Thank for reading !
    Sebastian
    Last edited by spkag (2010-07-23 15:55:35)

    Thanks to both of you, but none seems to work.
    I've tried the different tips and even put them together.
    This is what it looks like at the moment :
    [global]
    # Browsing / Identification #
    netbios name = ARCH-PC
    server string = %h Server (Samba, ArchLinux)
    # Authentication #
    security = user
    encrypt passwords = true
    map to guest = bad user
    guest account = pcguest
    passdb backend = tdbsam
    obey pam restrictions = yes
    invalid users = root
    # Public Share. Mount this on a Unix client with the following.
    # sudo mount -t smbfs -o username=[username],password=[password],\
    # rw,uid=[your Unix user],gid=[your Unix group] \
    # //[netbios or ip of server]/private /path/to/mount/point
    # Optionally use a credentials file and credentials=/path/to/credentials (see below)
    [Movies]
    comment = Movies
    path = /media/Elements/Videos/Movies/
    guest ok = yes
    [Music]
    comment = Music
    path = /media/Elements/Sounds/Music/
    guest ok = yes
    # Public Share. Mount this on a Unix client with the following.
    # sudo mount -t smbfs -o username=,password=,\
    # rw,uid=[your Unix user],gid=[your Unix group] \
    # //[netbios or ip of server]/public /path/to/mount/point
    [Repo]
    comment = Repo
    path = /media/Elements/Repo/
    read only = no
    create mask = 0777
    directory mask = 0777
    writelist=guest
    guest only = no
    guest ok = yes
    All the three folders are in ro. Can't put Repo in rw...
    Last edited by spkag (2010-07-24 13:54:26)

  • Why can't I access my roommates' Windows computers through samba?

    I'm using KDEmod.  I can see our workgroup, MSHOME, by going through system -> remote places -> samba shares.  Sometimes, I can open the workgroup and see my roommates computers but if I try to access them, Konqueror will time out.  As of this very second, I can't even see them.  I'm pretty sure it isn't a problem with the network itself because they can all see each other and share files, and they can get my files as well, I just can't get theirs.  Here is my samba configuration file.  Any idea what the problem could be?  There is a good chance I have it configured wrong, I'm fairly new to Linux.  I followed the directions on the samba wiki entry.
    #======================= Global Settings =====================================
    [global]
    # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
    workgroup = MSHOME
    # server string is the equivalent of the NT Description field
    server string = Samba Server
    # Security mode. Defines in which mode Samba will operate. Possible
    # values are share, user, server, domain and ads. Most people will want
    # user level security. See the Samba-HOWTO-Collection for details.
    security = user
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page
    ; hosts allow = 192.168.1. 192.168.2. 127.
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    ; 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.log
    # 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
    # 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
    # These scripts are used on a domain controller or stand-alone
    # machine to add or delete corresponding unix accounts
    ; add user script = /usr/sbin/useradd %u
    ; add group script = /usr/sbin/groupadd %g
    ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
    ; delete user script = /usr/sbin/userdel %u
    ; delete user from group script = /usr/sbin/deluser %u %g
    ; delete group script = /usr/sbin/groupdel %g
    #============================ Share Definitions ==============================
    #[homes]
    # comment = Home Directories
    # browseable = no
    # writable = no
    # 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
    # writable = no
    # printable = yes
    # This one is useful for people to share files
    ;[tmp]
    ; comment = Temporary file space
    ; path = /tmp
    ; read only = no
    ; public = yes
    # A publicly accessible directory, but read only, except for people in
    # the "staff" group
    ;[public]
    ; comment = Public Stuff
    ; path = /home/samba
    ; public = yes
    ; writable = yes
    ; printable = no
    ; write list = @staff
    # Other examples.
    # A private printer, usable only by fred. Spool data will be placed in fred's
    # home directory. Note that fred must have write access to the spool directory,
    # wherever it is.
    ;[fredsprn]
    ; comment = Fred's Printer
    ; valid users = fred
    ; path = /homes/fred
    ; printer = freds_printer
    ; public = no
    ; writable = no
    ; printable = yes
    # A private directory, usable only by fred. Note that fred requires write
    # access to the directory.
    ;[fredsdir]
    ; comment = Fred's Service
    ; path = /usr/somewhere/private
    ; valid users = fred
    ; public = no
    ; writable = yes
    ; printable = no
    # a service which has a different directory for each machine that connects
    # this allows you to tailor configurations to incoming machines. You could
    # also use the %U option to tailor it by user name.
    # The %m gets replaced with the machine name that is connecting.
    ;[pchome]
    ; comment = PC Directories
    ; path = /usr/pc/%m
    ; public = no
    ; writable = yes
    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes
    ; printable = no
    # The following two entries demonstrate how to share a directory so that two
    # users can place files there that will be owned by the specific users. In this
    # setup, the directory should be writable by both users and should have the
    # sticky bit set on it to prevent abuse. Obviously this could be extended to
    # as many users as required.
    ;[myshare]
    ; comment = Mary's and Fred's stuff
    ; path = /usr/somewhere/shared
    ; valid users = mary fred
    ; public = no
    ; writable = yes
    ; printable = no
    ; create mask = 0765
    #This is my music
    [Music]
    path = /media/SEA_DISC/Music
    browseable = yes
    read only = yes
    valid users = nelson
    #This is my videos
    [Videos]
    path = /media/SEA_DISC/Videos
    browseable = yes
    read only = yes
    valid users = nelson

    I don't know much about samba, but I have had very similar problems with netbios in windows, I find it to be very unreliable and I think you would be better off with ftp, but that's just my opinion. Apart from that, are you sure you have the necessary ports opened, and so do they? And you might need a line in /etc/hosts.allow
    Last edited by calef13 (2008-04-21 10:28:45)

Maybe you are looking for

  • A versatile use of "paper"..

    This is my first ever 'rant' on a bulletin board.. I quote from Mark Singer's post, near the end of this thread: "I see you got HD Sony working right. You have to be a detective(or follow instructions!)" What the ..? What is the big deal about "follo

  • How do I transfer songs from iPod to MacBook?

    I have a 3rd gen iPod shuffle and i want to transfer the songs from it to my MacBook Pro (retina). But when I try and drag of copy-paste the songs, nothing happens!! I really want my songs on my MacBook as well so that i can listen to them without ha

  • Doubts in functional upgradation from 3.x to 7.0.

    Hi All, I have some doubts in functional upgradation from 3.x to 7.0. After migration of Transfer rules, update rules ( between the ods & cube also) & datasource. 1). Cube & ods have filed which is added like enhanced field, do we have to do anything

  • RV320 problem with VPN connect (BUG)

    forgive for bad English Today I bought and I adjusted RV320, at once I saw some problems. Firmware last 1. I adjusted two VPN tunnels between RV320 and two RV-082 also I saw what not one tunnel in Web panel not connect. I many times pressed, the cond

  • Having one iCal between two Macs

    Hi, sorry if I don't use the right language, but I'm new here, suck with technology, and couldn't find an existing post to solve my problem. I have a PowerBook at home, and I also use an iMac in my office at school. Is there a way that anytime I add