LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-22-2013, 04:41 PM   #1
ssaia
LQ Newbie
 
Registered: May 2005
Distribution: CentOS
Posts: 12

Rep: Reputation: 0
issue with samba centos 6.3 to windows 2008 server


Hi everyone im new to the world of linux with some basic knowledge, i have an issue with publishing a share to windows 2008 server from my linux machine, th linux machine name being centos-1 & windows 2008 2k8srv this is what has been done so far

samba has been installed using version 3.6 a user named demo has been created the smb.com has been backed up and changed as follows:

[global]

[share1]

path = /srv/share1
comment = test share1
writeable = yes
browseable = yes
valid users = demo

workgroup = workgroup

server string = Samba Server Version %v

netbios name = centos-1

ive created a samba user using smbpasswd -a demo with an assigned password. the testparm tool doesnt show any errors with the file. Im able to ping from both machines ip and hostname except that the windows machine is unable to ping centos-1. Whats strange that it pings via the name linux, i had a look at etc/hosts and inserted both ip and host names, in the /etc/resolv.conf i changed the name server to the ip of centos-1. I have also restarted both smb and nmb services, am i missing something?

Thanks for your assistance
 
Old 04-23-2013, 03:58 AM   #2
gdizzle
Member
 
Registered: Jul 2012
Posts: 208

Rep: Reputation: Disabled
Do a :

Confirm the hostname with:

Code:
hostname -f
Check

Code:
/etc/sysconfig/network
If there is a Hostname entry in check it's correct.

Check on the Windows Host: C:\windows\system32\etc\drivers or whatever the windows path and check there is no static entry for Linux.

Check for an entry on DNS/BIND server, there may be a static entry from an old computer with the name "linux"


If that's your /etc/samba/smb.conf file I would back it up and start over,
Code:
yum remove samba
then
Code:
yum install samba
Your config file is all over the shop there should be a tonne of entries under the global section.
 
Old 04-23-2013, 04:00 AM   #3
John VV
Guru
 
Registered: Aug 2005
Posts: 13,457

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
before you get to far .You should know that CentOS 6.3 is unsupported!
cent unlike red hat ONLY supports the current minor version ONLY .
And that is now CentOS 6.4 and 5.9

you need to upgrade to the next minor version ASAP
otherwise you will never get the now current security fixes

it is easy so
Code:
su -
yum --releasever=6.4 upgrade
 
Old 04-23-2013, 06:11 PM   #4
gdizzle
Member
 
Registered: Jul 2012
Posts: 208

Rep: Reputation: Disabled
John VV excuse my ignorance, but Centos has support other than the community???

I was under the assumption all Centos no matter what version is supported by the community only??
 
Old 04-25-2013, 02:59 AM   #5
ssaia
LQ Newbie
 
Registered: May 2005
Distribution: CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
Hello ,

Before i even consider upgrading to 6.4 i would prefer to troubleshoot the curent environment, centos-1 & 2k8srv are installed on virtualbox and networked when i ping the linux machine from windows 2008 it replies by the ip address but it cannot ping by the hostname. on centos-1 when i invoke the command hostname -f it resolves to centos-1, when i invoke the command smbclient-l centos-1 it fails with a message which im currently unable to post as i am not at home (will provide the message when i return from work), im wondering if its permissions on the folder that needs to be configured, when i check the user & group owner is set as root so i assume that needs to be changed.

I verified in /etc/sysconfig/network machine name is centos-1 same applies in /etc/hosts & etc/hostname

Important to note & a mistake on my behalf (my apologies) the machine name Linux is infact the physical machine running Linux mint.

To resume the current environment:

Linux: Host machine runinning Linux Mint
Centos-1 - Virtual machine
2k8srv - virtual machine

Thanks for assisting
 
Old 04-25-2013, 04:20 AM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 13,457

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
so you are trying to use samba from one virtual install to a second virtual install

mint is running AND two VM's are also running on mint
 
Old 04-25-2013, 04:05 PM   #7
ssaia
LQ Newbie
 
Registered: May 2005
Distribution: CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
Hi John VV,

That is correct below is my smb.conf file:

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

[global]

[share1]

path = /srv/share1
comment = test share1
writeable = yes
browseable = yes
valid users = demo
# ----------------------- 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 = workgroup

server string = Samba Server Version %v

netbios name = centos-1

; interfaces = lo eth0 eth3 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.192.168.1.5.

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# max 50KB per log file, then rotate
max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
max log size = 50
----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# max 50KB per log file, then rotate
max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# 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.

security = user
passdb backend = tdbsam


# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# 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.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# 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 = *


; security = domain
; passdb backend = tdbsam
; realm = MY_REALM

; password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------
# Security must be set to user for domain controllers
#
# 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.
#
# 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 Logons let Samba be a domain logon server for Windows workstations.
#
# Logon Scrpit let yuou specify a script to be run at login time on the client
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
; security = user
; passdb backend = tdbsam
domain master = yes
; domain logons = yes

# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
; logon path =

; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"
----------------------- 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
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
#
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# - 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.
#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.

; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option
load printers = yes
cups options = raw

; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups

# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes

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

[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
 
Old 04-25-2013, 04:31 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 13,457

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
before getting into a virtual samba running between two virtual installs

can the virtual centos read and wright to the virtual windows 2008 server

if your VM is set up correctly the virtual cent should , by default, be able to read and write to the old win2008 virtual install
 
Old 04-26-2013, 03:01 AM   #9
ssaia
LQ Newbie
 
Registered: May 2005
Distribution: CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
Hi John,

Thanks again for your reply, please note that i am new to Linux so i dont know how to determine if i can read or write to the windows server. Could you guide me?

Thanks for your support
 
Old 04-27-2013, 07:03 AM   #10
ssaia
LQ Newbie
 
Registered: May 2005
Distribution: CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
I did some further analysis this is what i discovered,

Both machines can ping each other via the ip but not via hostname

when i invoke the command smbclient -L centos-1 i receive the following message:

Connection to centos-1 failed (Error NT_STATUS_CONNECTION_REFUSED)

in the etc/hosts file contains the following:

27.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.5 2k8srv
192.168.1.4 centos-1


/etc/sysconfig/network contains the following

NETWORKING=yes
HOSTNAME=centos-1

on windows in c:\windows\system32\drivers\etc the hosts file contains the entry for the centos machine

192.168.1.4 centos-1

In windows when i go to network it doesnt see the computer object centos-1 i dont know how to troubleshoot this.
 
Old 04-27-2013, 01:36 PM   #11
John VV
Guru
 
Registered: Aug 2005
Posts: 13,457

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
right now i am out of the area i know

i have never tried to get a linux VM to use samba to talk to a win2008 VM install, on the same host machine .

non VM it is strait forward to get CentOS and windows to use samba
but when BOTH are running VM's on the SAME host ??????
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapping Windows Server 2008 R2 AD users to shares mounted on a CentOS server. MeeLee Linux - Server 2 02-19-2013 04:25 AM
I want to join Centos to Windows Server 2008 Domain .. euro007 Linux - Networking 2 02-23-2012 03:23 AM
Joining Windows Server 2008 R2 to a Samba domain ... sankeny Linux - Server 0 10-21-2011 09:30 PM
How to join a server with Centos 5.2 to a Windows 2008 domain? aten Linux - Server 3 08-25-2011 03:56 AM
CentOS /Samba server- XP Windows client file sharing issue 3phoenix Linux - Server 7 11-06-2009 12:05 PM


All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration