Samba setup on 6.2

Issues related to applications and software problems

Samba setup on 6.2

Postby NickC » 2012/04/02 15:11:10

Is there a simple gui samba setup application available? I want to allow Win 2003 machines and Win 7 client VMs to access some file shares on the CentOS 6.2 server. Apart from some sort of gui sharing manager and the samba core is there anything else I will need to install to get this working.

Thanks,
Nick
NickC
 
Posts: 109
Joined: 2012/01/20 16:13:41

Samba setup on 6.2

Postby pschaff » 2012/04/02 15:19:44

As far as I know the only option is samba-swat:
Code: Select all
# yum info samba-swat
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
Available Packages
Name        : samba-swat
Arch        : i686
Version     : 3.5.10
Release     : 114.el6
Size        : 3.0 M
Repo        : base
Summary     : The Samba SMB server Web configuration program
URL         : http://www.samba.org/
License     : GPLv3+ and LGPLv3+
Description : The samba-swat package includes the new SWAT (Samba Web
            : Administration Tool), for remotely managing Samba's smb.conf file
            : using your favorite Web browser.

I have always found it preferable to just edit the config file. According to TUV's Migration Guide:
[color=ff0000]system-config-samba[/color]

The system-config-samba tool has been deprecated and removed without replacement. Users must set up SMB server configuration manually.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba setup on 6.2

Postby vonskippy » 2012/04/02 20:10:35

Webmin has a decent Samba manager.
User avatar
vonskippy
 
Posts: 685
Joined: 2006/12/30 03:00:04
Location: Western Slope Colorado

Re: Samba setup on 6.2

Postby NickC » 2012/04/04 12:07:39

Can't find Webmin anywhere. Have installed samba-swat and also samba-winbind but can't see how I am supposed to share a drive or directory, still can't seem to find any gui sharing manager or any other way of creating a share. How do I share a directory?
NickC
 
Posts: 109
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Postby Crunch » 2012/04/04 14:23:34

the samba configuration file is /etc/samba/smb.conf

you can edit it as below and save it. After editing the file you need to restart the smbd server and make sure that it starts at boot with the following commands

Code: Select all
chkconfig --level 2345 smb on
/etc/init.d/smb restart


editing smb.conf file: the default config file has the following section which can be copied, uncommented and modified to suit your needs:

Code: Select all
# 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


I modified mine to:

Code: Select all
       [SHARE NAME]
       comment = COMMENT
       path = /home/SHARE
       public = yes
       writable = yes
       printable = no
       write list = +staff


please do man smb.conf for further info on the options
Crunch
 
Posts: 101
Joined: 2012/04/02 11:24:46

Re: Samba setup on 6.2

Postby pschaff » 2012/04/04 15:06:04

NickC wrote:
Can't find Webmin anywhere.

Google certainly knows about it, but I can't make any further recommendations as I've never used it and am not interested in trying. It does seem rather popular among the anti-command-line set. :-)
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba setup on 6.2

Postby NickC » 2012/04/09 15:42:54

pschaff wrote:
NickC wrote:
Can't find Webmin anywhere.

Google certainly knows about it, but I can't make any further recommendations as I've never used it and am not interested in trying. It does seem rather popular among the anti-command-line set. :-)


What I mean't to say was that I couldn't find it in any CentOS repositories anywhere.
NickC
 
Posts: 109
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Postby NickC » 2012/04/09 16:30:07

/etc/samba/smb.conf now edited as you suggest:

Code: Select all
#======================= Global Settings =====================================
   
[global]
   
# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
   workgroup = TESTGROUP
   server string = Samba Server Version %v
   
   netbios name = VMHost
   
   interfaces = lo eth0 192.168.10.2/24
   hosts allow = 127. 192.168.10.

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

   [home]
   comment = Home
   path = /home
   public = yes
   writable = yes
   write list = +staff


ifconfig for eth0 shows:
inet addr: 192.168.10.34

/etc/init.d/smb restart
works ok but after a server reboot the service is not running until I start it manually

smbtree returns:
Code: Select all
session request to 192.168.10.35 failed (Called name not present)
TESTGROUP
  \\WIN1Server
    \\Win1Server\share1 etc.

findsmb returns:
no smb machines listed

Trying to connect to a Windows share returns:
DBus error
org.freedesktop.DBus.Error.InvalidArgs: Mountpoint Already registered

Any ideas what has gone wrong, this is turning into a nightmare. I thought simple file sharing would be easy.
NickC
 
Posts: 109
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Postby pschaff » 2012/04/09 17:35:48

NickC wrote:
What I mean't to say was that I couldn't find it in any CentOS repositories anywhere.

Because it is not there. You have to get it from the Webmin site.

...
/etc/init.d/smb restart
works ok but after a server reboot the service is not running until I start it manually

Did you
Code: Select all
chkconfig smb on
chkconfig nmb on
?

I have:
Code: Select all
# chkconfig --list | grep mb
nmb               0:off   1:off   2:on   3:on   4:on   5:on   6:off
smb               0:off   1:off   2:on   3:on   4:on   5:on   6:off


Trying to connect to a Windows share returns:
DBus error
org.freedesktop.DBus.Error.InvalidArgs: Mountpoint Already registered

How are you trying to connect? If trying (as it appears) to mount, are you sure nothing else is mounted on the mountpoint?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba setup on 6.2

Postby NickC » 2012/04/09 19:23:13

Hi Phil,

chkconfig lines you suggested have worked to permanently start the services, thanks.

Trying to mount windows share from Nautilus -> Network -> Wiondows Network -> Workgroup -> Servername
This now works for no apparent reason.

Unfortunately the Samba share still doesn't work and still errors with 'Failed to retrieve share list from server'.

Nick
NickC
 
Posts: 109
Joined: 2012/01/20 16:13:41

Next

Return to CentOS 6 - Software Support

Who is online

Users browsing this forum: docpp, Yahoo [Bot] and 5 guests