Samba setup on 6.2

Issues related to applications and software problems
NickC
Posts: 186
Joined: 2012/01/20 16:13:41

Samba setup on 6.2

Post by 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

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Samba setup on 6.2

Post by pschaff » 2012/04/02 15:19:44

As far as I know the only option is samba-swat:
[code]# 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.
[/code]
I have always found it preferable to just edit the config file. According to [url=http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Migration_Planning_Guide/chap-Migration_Guide-Package_Changes.html]TUV's Migration Guide[/url]:
[quote]
[color=ff0000][b]system-config-samba[/b][/color]

The [i]system-config-samba[/i] tool has been deprecated and removed without replacement. Users must set up SMB server configuration manually. [/quote]

User avatar
vonskippy
Posts: 839
Joined: 2006/12/30 03:00:04
Location: Western Slope Colorado

Re: Samba setup on 6.2

Post by vonskippy » 2012/04/02 20:10:35

Webmin has a decent Samba manager.

NickC
Posts: 186
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Post by 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?

Crunch
Posts: 101
Joined: 2012/04/02 11:24:46

Re: Samba setup on 6.2

Post by 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]chkconfig --level 2345 smb on
/etc/init.d/smb restart[/code]

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

[code]
# 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
[/code]

I modified mine to:

[code]
[SHARE NAME]
comment = COMMENT
path = /home/SHARE
public = yes
writable = yes
printable = no
write list = +staff
[/code]

please do man smb.conf for further info on the options

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Samba setup on 6.2

Post by pschaff » 2012/04/04 15:06:04

[quote]
NickC wrote:
Can't find Webmin anywhere. [/quote]
[url=https://www.google.com/search?q=webmin&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a]Google[/url] 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. :-)

NickC
Posts: 186
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Post by NickC » 2012/04/09 15:42:54

[quote]
pschaff wrote:
[quote]
NickC wrote:
Can't find Webmin anywhere. [/quote]
[url=https://www.google.com/search?q=webmin&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a]Google[/url] 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. :-)[/quote]

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

NickC
Posts: 186
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Post by NickC » 2012/04/09 16:30:07

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

[code]#======================= 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
[/code]

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]session request to 192.168.10.35 failed (Called name not present)
TESTGROUP
\\WIN1Server
\\Win1Server\share1 etc.
[/code]
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.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Samba setup on 6.2

Post by pschaff » 2012/04/09 17:35:48

[quote]
NickC wrote:
What I mean't to say was that I couldn't find it in any CentOS repositories anywhere.[/quote]
Because it is not there. You have to get it from the [url=http://www.webmin.com/download.html]Webmin[/url] site.

[quote]
...
/etc/init.d/smb restart
works ok but after a server reboot the service is not running until I start it manually[/quote]
Did you
[code]chkconfig smb on
chkconfig nmb on[/code]?

I have:[code]
# 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[/code]
[quote]

Trying to connect to a Windows share returns:
DBus error
org.freedesktop.DBus.Error.InvalidArgs: Mountpoint Already registered[/quote]
How are you trying to connect? If trying (as it appears) to mount, are you sure nothing else is mounted on the mountpoint?

NickC
Posts: 186
Joined: 2012/01/20 16:13:41

Re: Samba setup on 6.2

Post by 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

Post Reply