Results 1 to 10 of 16
Hi,
Having troubles getting centos hostname to be resolved.
Server is running CentOS release 6.3 (Final)
can't ping it, and when i nslookup the name, local dns server does not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-07-2012 #1Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
issues with resolving
Hi,
Having troubles getting centos hostname to be resolved.
Server is running CentOS release 6.3 (Final)
can't ping it, and when i nslookup the name, local dns server does not see it.
I'm having troubles with smb, it does not start for some unknown error which I don't understand what to fix as the messages from the log is not detailed on trying to start
samba
resulting:Code:service smb start
also on:Code:Starting SMB services: [FAILED]
Code:service smb restart
message from log:Code:Shutting down SMB services: [FAILED] Starting SMB services: [FAILED]
smb.conf file has the following lines:Code:Nov 7 14:44:04 dataprobe-1 smbd[14186]: [2012/11/07 14:44:04.476049, 0] smbd/server.c:1156(main) Nov 7 14:44:04 dataprobe-1 smbd[14186]: error opening config file
Code:workgroup = DOMAIN password server = dcontroller.domain.com realm = DOMAIN.COM security = ads idmap uid = 10000-20000 idmap gid = 10000-20000 template homedir = /home/%D/%U template shell = /bin/bash # winbind use default domain = true winbind offline logon = false #--authconfig--end-line-- ; workgroup = DOMAIN ; realm = DOMAIN.COM # server string = ; use kerberos keytab = yes ; kerberos method = system keytab kerberos method = secrets and keytab enable privileges = yes printcap name = cups load printers = yes printing = cups log file = /var/log/samba/log.%m max log size = 50 log level = 5 interfaces = bond0 lo bind interfaces only = yes ; hosts allow = 192.168.1. 192.168.2. 127. map to guest = bad user ; security = ads auth methods = winbind encrypt passwords = yes ; winbind separator = + winbind use default domain = yes ; template homedir = /home/%D/%U obey pam restrictions = yes ; template shell = /bin/bash socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 local master = no os level = 33 ; domain master = yes ; preferred master = yes ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 winbind enum users = yes winbind enum groups = yes winbind refresh tickets = yes client use spnego = yes client ntlmv2 auth = yes wins server = dcontroller.domain.com dns proxy = no # 8. File Naming Options: # 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 dos charset = ASCII unix charset = UTF8 display charset = UTF8 #============================ Share Definitions ============================== [homes] comment = Home Directories browseable = no writable = yes # You can enable VFS recycle bin on a per share basis: # Uncomment the next 2 lines (make sure you create a # .recycle folder in the base of the share and ensure # all users will have write access to it. See # examples/VFS/recycle/REAME in the samba docs for details ; vfs object = /usr/lib/samba/vfs/recycle.so # [documentation] # path = /home/documentation # comment = Public Documentation Directory # browseable = yes # writable = yes # public = yes
The following is nsswitch.conf:
Code:# # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Valid entries include: # # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the local database (.db) files # compat Use NIS on compat mode # hesiod Use Hesiod for user lookups # [NOTFOUND=return] Stop searching if not found so far # # To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis passwd: compat winbind shadow: compat winbind group: compat winbind #hosts: db files nisplus nis dns hosts: files dns winbind # Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files bootparams: nisplus [NOTFOUND=return] files ethers: db files netmasks: files networks: files dns protocols: db files rpc: db files services: db files netgroup: files # publickey: nisplus automount: files aliases: files
resolv.conf has the following information:
Code:domain domain.com search domain.com nameserver 192.168.1.254
I have no problem pinging its' ip address, and accessing it via typing its' ip, but not able to access or ping it by it's hostname server-1.
Would really appreciate any assitance into this.
- 11-07-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,746
Hi,
In order to resolve your hostname locally, just enter the hostname in the file /etc/hosts, using the ip address that you normally use to access it, e.g.:
If you need to resolve it from another host on the network, you can put the same entry in that files /etc/hosts file. If you want to resolve the ip address from the internet, then yeah, you need an FQDN and a DNS record. You probably don't need that, though.Code:192.168.1.2 server-1
Where is the smb.conf file that you posted located on your filesystem? It should be here:I'm having troubles with smb, it does not start for some unknown error which I don't understand what to fix as the messages from the log is not detailed on trying to start
samba
Code:Nov 7 14:44:04 dataprobe-1 smbd[14186]: [2012/11/07 14:44:04.476049, 0] smbd/server.c:1156(main) Nov 7 14:44:04 dataprobe-1 smbd[14186]: error opening config file
Code:# ls -l /etc/samba/smb.conf -rw-r--r-- 1 root root 11835 May 21 00:29 /etc/samba/smb.conf
- 11-07-2012 #3Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
Thanks for the reply atreyu,
For the DNS part,
I have a dns server which resolves the names using dnsmasq service, it's only for local use,
I don't want to do it by the hosts file, as I want to pick it up automatically from my dns server, no need for a fqdn record, just internal use.
SMB file:
smb file is locate in /etc/samba/smb.conf:
Code:[root@server-1 samba]# pwd /etc/samba [root@server-1 samba]# ls -l total 28 -rw-r--r--. 1 root root 20 Jun 22 22:18 lmhosts -rw-r--r--. 1 user domain admins 2709 Oct 31 18:51 smb.conf -rw-r--r--. 1 root root 10299 Oct 10 11:08 smb.conf.bak -rw-r--r--. 1 root root 2780 Oct 26 13:49 smbconf.bak -rw-r--r--. 1 root root 97 Jun 22 22:18 smbusers
- 11-07-2012 #4Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
- 11-07-2012 #5Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,746
so have you tried to configure dnsmasq to resolve local addresses and it is not working? i've never used dnsmasq, but i'm sure there has to be some sort of configuration you need to do first. maybe in /etc/dnsmasq.conf (see the local= parameter for example). also read up on the man page, if you haven't already:
Code:man dnsmasq
that smb.conf file is group-owned by "domain admins"? i've never seen/used a group w/spaces, interesting. can you put the default smb.conf back (with root ownership) and restart, just to see if you can get it to work that way?Code:[root@server-1 samba]# pwd /etc/samba [root@server-1 samba]# ls -l total 28 -rw-r--r--. 1 root root 20 Jun 22 22:18 lmhosts -rw-r--r--. 1 user domain admins 2709 Oct 31 18:51 smb.conf -rw-r--r--. 1 root root 10299 Oct 10 11:08 smb.conf.bak -rw-r--r--. 1 root root 2780 Oct 26 13:49 smbconf.bak -rw-r--r--. 1 root root 97 Jun 22 22:18 smbusers
Also is there any additional info in /var/log/messages or the samba logs (usually in the /var/log/samba/ dir)?
- 11-08-2012 #6Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
Thanks for getting back atreyu,
dnsmasq is already configured on another server, and working perfectly well.
all other servers are resolved well, its only with the centos hosts I'm having trouble getting to resolve.
Yeah, you are right there are logs in /var/log/samba/
on commencing the code:
and on trying to start the serviceCode:tail -f log.smbd
Code:service smb start
it fails and on the the message on log.smbd
Code:[2012/11/08 12:44:49, 0] smbd/server.c:1141(main) smbd version 3.5.10-125.el6 started. Copyright Andrew Tridgell and the Samba Team 1992-2010 [2012/11/08 12:44:49.054235, 1] ../lib/util/params.c:513(OpenConfFile) params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": Permission denied [2012/11/08 12:44:49.054895, 0] smbd/server.c:1156(main) error opening config file
I did try to bring back smb conf, that will work, but then,
active directory integtration does not work.
As I binded it to our active directory.
- 11-08-2012 #7Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,746
Is it working on other DNS clients that are Linux hosts, or are they Windows hosts?
you have this in /etc/resolv.conf:
I assume that is the ip address of the dnsmasq server?Code:nameserver 192.168.1.254
so can try using your AD-modified smb.conf file, but just make it owned by root:root?I did try to bring back smb conf, that will work, but then,Code:[2012/11/08 12:44:49, 0] smbd/server.c:1141(main) smbd version 3.5.10-125.el6 started. Copyright Andrew Tridgell and the Samba Team 1992-2010 [2012/11/08 12:44:49.054235, 1] ../lib/util/params.c:513(OpenConfFile) params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": Permission denied [2012/11/08 12:44:49.054895, 0] smbd/server.c:1156(main) error opening config file
active directory integtration does not work.
As I binded it to our active directory.
- 11-08-2012 #8Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
Correct, 192.168.1.254 is the dns server with dnsmasq.
I did change the smb.conf
to root:root ownership permissions
as follows:
Code:sudo chown root smb.conf sudo chgrp root smb.conf
Code:ls -l -rw-r--r--. 1 root root 20 Jun 22 22:18 lmhosts -rw-r--r--. 1 root root 2709 Oct 31 18:51 smb.conf -rw-r--r--. 1 root root 10299 Oct 10 11:08 smb.conf.bak -rw-r--r--. 1 root root 2780 Oct 26 13:49 smbconf.bak -rw-r--r--. 1 root root 97 Jun 22 22:18 smbusers
Code:getfacl smb.conf # file: smb.conf # owner: root # group: root user::rw- group::r-- other::r--
Still no luck, it fails to startCode:sudo service smb start
Code:Starting SMB services: [FAILED]
cheers,
- 11-08-2012 #9Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,746
Re: DNS
1. what about your other DNS clients that you say are working: are any of them Linux?
2. do you have root on the dnsmasq server? i.e., can you check the config/logs?
Re: Samba
1. to be clear, is only the AD-modified smb.conf not working? When you've changed the permissions to root:root on the file, do the logs still report "unable to open configuration file"?
2. how about SELinux, is that on? Check with:
Code:getenforce
- 11-08-2012 #10Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
thanks Atreyu for the reply,
1) Yes, there are linux clients, most ubuntu and gentoo clients.
2) SElinux is set to enforcing on:
'getenforce'
Code:Enforcing
Could it be the problem, should I disable selinux?
2) Yes there is root on dnsmasq server
After I changed the permissions for smb.conf to root:root, permission denied is the same, I have a feeling that some of the lines probably in smb.conf
are not read properly or something and that is the reason.
the message on /var/log/samba/log.smbd:
and on var/log/messages it says:Code:[2012/11/08 17:06:40, 0] smbd/server.c:1141(main) smbd version 3.5.10-125.el6 started. Copyright Andrew Tridgell and the Samba Team 1992-2010 [2012/11/08 17:06:40.061792, 1] ../lib/util/params.c:513(OpenConfFile) params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": Permission denied [2012/11/08 17:06:40.062526, 0] smbd/server.c:1156(main) error opening config file
Code:Nov 8 17:06:40 dataprobe-1 smbd[19656]: [2012/11/08 17:06:40.062526, 0] smbd/server.c:1156(main) Nov 8 17:06:40 dataprobe-1 smbd[19656]: error opening config file


Reply With Quote

