Hi Rowland sorry for late reply I've tried as you suggested to download and install, using : wget -cq https://www.samba.org/samba/ftp/samba-latest.tar.gz tar zxf samba-latest.tar.gz cd samba* ./configure && make && make install But after i type #samba -V And #smbclient -V It return an error that samba is not installed -bash: /usr/sbin/samba: No such file or directory Is there any step i did a mistake here ? -----Original Message----- From: Rowland Penny [mailto:rowlandpenny at googlemail.com] Sent: 03 April 2015 23:33 To: samba at lists.samba.org Subject: Re: [Samba] Trouble of setting samba with join AD On 03/04/15 16:15, Adhi Nugraha Wirawan wrote:> On Apr 2, 2015, at 16:17, Rowland Penny <rowlandpenny at googlemail.com>wrote:> >> On 02/04/15 09:12, Adhi N. Wirawan wrote: >>> Hi there, >>> >>> >>> I manage to setup samba with the Kerberos, if i check with >>> >>> >>> #host -t SRV _ldap._tcp.test.sg >>> >>> _ldap._tcp.test.sg has SRV record 0 0 389 4ecapsvsg6.test.sg. >>> >>> >>> #host -t SRV _kerberos._udp.test.sg >>> >>> _kerberos._udp.test.sg has SRV record 0 0 88 4ecapsvsg6.test.sg. >>> >>> >>> #host -t A 4ECAPSVSG6.test.sg >>> >>> 4ECAPSVSG6.test.sg has address 10.153.64.5 >>> >>> >>> But unfortunately i just can't join to AD, if i enter >>> >>> >>> #smbclient -L 4ecapsvsg6 -U% >>> >>> Sharename Type Comment >>> >>> --------- ---- ------- >>> >>> IPC$ IPC IPC Service >>> >>> >>> #smbclient //4ecapsvsg6/netlogon -UAdministrator%"Pa$$worD" -c 'ls' >>> >>> Connection to \\4ecapsvsg6\netlogon failed - NT_STATUS_LOGON_FAILURE >>> >>> >>> And if i try : >>> >>> >>> #sudo net ads join >>> >>> Failed to join domain: failed to find DC for domain TEST >>> >>> >>> #sudo net ads join -S 4ECAPSVSG6 -U administrator%"Pa$$worD" >>> >>> Failed to join domain: failed to lookup DC info for domain 'TEST.SG' >>> over >>> rpc: No such domain >>> >>> >>> Is there any steps i'm missing here ? >>> >> Yes, you forgot to tell us just how you installed samba, what youinstalled it on and what you are trying to join to.>> >> Sorry but we are not mind readers! >> >> Rowland > > Hi Rowland, > > hehe yes i do forgot to mention specific information, sorry about that > :) > > I try to install Samba4 inside uBuntu 12.04.05 by build from git, > > #git clone -b v4-stable git://git.samba.org/samba.git samba4 #cd > samba4 #./configure --enable-debug --enable-selftest #make #make > install > > The Samba version is 4.0.0alpha18 > > i'm trying to join to AD in Windows XP / 7. > > any other specific information should i mention ? > > > ~ Adhibit lost here, if I try: git clone -b v4-stable git://git.samba.org/samba.git samba4 I get: Cloning into 'samba4'... fatal: Remote branch v4-stable not found in upstream origin Why are you trying to use git anyway ? Please use the latest stable version: wget -cq https://www.samba.org/samba/ftp/samba-latest.tar.gz tar zxf samba-latest.tar.gz cd samba* ./configure && make && make install This will get you 4.1.17, a lot better than 4.0.0alpha18 Having said that, if were to use debian wheezy, you could install samba 4 from backports and get 4.1.17 without having to compile it. I also think that when you said 'But unfortunately i just can't join to AD' , you really meant that you couldn't connect. If you compile samba 4 yourself, you do not get the required winbind links created, see the samba wiki member server page for this. Rowland
On 06/04/15 03:11, Adhi N. Wirawan wrote:> Hi Rowland sorry for late reply > > I've tried as you suggested to download and install, using : > > wget -cq https://www.samba.org/samba/ftp/samba-latest.tar.gz > tar zxf samba-latest.tar.gz > cd samba* > ./configure && make && make install > > But after i type > > #samba -V > And > #smbclient -V > > It return an error that samba is not installed > > -bash: /usr/sbin/samba: No such file or directory > > Is there any step i did a mistake here ?Ah, it is probably just that the 'samba' binary is not in your path, it should be in /usr/local/samba/sbin Try running these two commands: echo "PATH=/usr/local/samba/bin:/usr/local/samba/sbin:\$PATH" > /etc/profile.d/samba4.sh export PATH=/usr/local/samba/bin:/usr/local/samba/sbin:$PATH Rowland> > > > > > > > > > > > > -----Original Message----- > From: Rowland Penny [mailto:rowlandpenny at googlemail.com] > Sent: 03 April 2015 23:33 > To: samba at lists.samba.org > Subject: Re: [Samba] Trouble of setting samba with join AD > > On 03/04/15 16:15, Adhi Nugraha Wirawan wrote: >> On Apr 2, 2015, at 16:17, Rowland Penny <rowlandpenny at googlemail.com> > wrote: >>> On 02/04/15 09:12, Adhi N. Wirawan wrote: >>>> Hi there, >>>> >>>> >>>> I manage to setup samba with the Kerberos, if i check with >>>> >>>> >>>> #host -t SRV _ldap._tcp.test.sg >>>> >>>> _ldap._tcp.test.sg has SRV record 0 0 389 4ecapsvsg6.test.sg. >>>> >>>> >>>> #host -t SRV _kerberos._udp.test.sg >>>> >>>> _kerberos._udp.test.sg has SRV record 0 0 88 4ecapsvsg6.test.sg. >>>> >>>> >>>> #host -t A 4ECAPSVSG6.test.sg >>>> >>>> 4ECAPSVSG6.test.sg has address 10.153.64.5 >>>> >>>> >>>> But unfortunately i just can't join to AD, if i enter >>>> >>>> >>>> #smbclient -L 4ecapsvsg6 -U% >>>> >>>> Sharename Type Comment >>>> >>>> --------- ---- ------- >>>> >>>> IPC$ IPC IPC Service >>>> >>>> >>>> #smbclient //4ecapsvsg6/netlogon -UAdministrator%"Pa$$worD" -c 'ls' >>>> >>>> Connection to \\4ecapsvsg6\netlogon failed - NT_STATUS_LOGON_FAILURE >>>> >>>> >>>> And if i try : >>>> >>>> >>>> #sudo net ads join >>>> >>>> Failed to join domain: failed to find DC for domain TEST >>>> >>>> >>>> #sudo net ads join -S 4ECAPSVSG6 -U administrator%"Pa$$worD" >>>> >>>> Failed to join domain: failed to lookup DC info for domain 'TEST.SG' >>>> over >>>> rpc: No such domain >>>> >>>> >>>> Is there any steps i'm missing here ? >>>> >>> Yes, you forgot to tell us just how you installed samba, what you > installed it on and what you are trying to join to. >>> Sorry but we are not mind readers! >>> >>> Rowland >> Hi Rowland, >> >> hehe yes i do forgot to mention specific information, sorry about that >> :) >> >> I try to install Samba4 inside uBuntu 12.04.05 by build from git, >> >> #git clone -b v4-stable git://git.samba.org/samba.git samba4 #cd >> samba4 #./configure --enable-debug --enable-selftest #make #make >> install >> >> The Samba version is 4.0.0alpha18 >> >> i'm trying to join to AD in Windows XP / 7. >> >> any other specific information should i mention ? >> >> >> ~ Adhi > bit lost here, if I try: > > git clone -b v4-stable git://git.samba.org/samba.git samba4 > > I get: > > Cloning into 'samba4'... > fatal: Remote branch v4-stable not found in upstream origin > > Why are you trying to use git anyway ? > > Please use the latest stable version: > > wget -cq https://www.samba.org/samba/ftp/samba-latest.tar.gz > tar zxf samba-latest.tar.gz > cd samba* > ./configure && make && make install > > This will get you 4.1.17, a lot better than 4.0.0alpha18 > > Having said that, if were to use debian wheezy, you could install samba > 4 from backports and get 4.1.17 without having to compile it. > > I also think that when you said 'But unfortunately i just can't join to AD' > , you really meant that you couldn't connect. > > If you compile samba 4 yourself, you do not get the required winbind links > created, see the samba wiki member server page for this. > > Rowland > > > > >
Hi Rowland, Thanks for the reply, Actually i reinstall all the procedure in uBuntu 14.04 and using samba version 4.1.6 (after fail in uBuntu 12.04 ans Samba 4.0.0alpha18) The problem remain the same I manage to do : ~# host -t SRV _ldap._tcp.test.sg _ldap._tcp.test.sg has SRV record 0 0 389 4ecapsvsg6.test.sg. ~# host -t SRV _kerberos._udp.test.sg _kerberos._udp.test.sg has SRV record 0 0 88 4ecapsvsg6.test.sg. ~# host -t A 4ecapsvsg6.test.sg 4ecapsvsg6.test.sg has address 10.153.64.5 And ~# smbclient -L 4ecapsvsg6 -U% Domain=[TEST] OS=[Unix] Server=[Samba 4.1.6-Ubuntu] Sharename Type Comment --------- ---- ------- Profiles Disk sysvol Disk netlogon Disk public Disk TEST Disk Resources Disk print$ Disk Printer Drivers IPC$ IPC IPC Service (Samba 4.1.6-Ubuntu) Domain=[TEST] OS=[Unix] Server=[Samba 4.1.6-Ubuntu] Server Comment --------- ------- Workgroup Master --------- ------- WORKGROUP 4ECAPSVSG6 but when i try ~# smbclient //4ecapsvsg6/netlogon -UAdministrator%"Pa$$worD" -c 'ls' session setup failed: NT_STATUS_NO_LOGON_SERVERS without it i cannot continue join the domain can you help me out here ?
I used this command to provision the domain sudo /usr/bin/samba-tool domain provision --realm test.sg --domain TEST --adminpass Pa$$worD --server-role=dc here below i include my /etc/samba/smb.conf : # Global parameters [global] workgroup = TEST realm = TEST.SG netbios name = 4ecapsvsg6 server role = active directory domain controller dns forwarder = 10.153.64.1 server services = +dns,+dnsupdate allow dns updates = nonsecure and secure username map = /etc/samba/smbusers security = ads debug level = 3 log level = 0 log file = /var/log/samba4/log.%m max log size = 50 client lanman auth = yes bind interfaces only = no follow symlinks = yes wide links = yes unix extensions = no idmap_ldb:use rfc2307 = Yes kdc:service ticket lifetime = 36000 kdc:user ticket lifetime = 36000 kdc:renewal lifetime = 36000 #printcap name = /dev/null #load printers = yes #disable spoolss = yes #printing = bsd socket options = SO_RCVBUF=8192 SO_SNDBUF=8192 TCP_NODELAY read raw = no [netlogon] path = /home/samba/netlogon # path = /var/db/samba4/sysvol/test.sg/scripts read only = No [sysvol] path = /var/db/samba4/sysvol read only = No [Profiles] path = /mnt/raid/Profiles read only = No create mask = 0600 directory mask = 0700 hide unreadable = yes store dos attributes = Yes csc policy = disable profile acls = Yes vfs object = recycle recycle:repository = /mnt/raid/.recycle/Profiles/%u/%I/%m/%S recycle:keeptree = Yes recycle:versions = Yes recycle:maxsize = 0 recycle:exclude = Thumbs.db *.tmp *.temp ~$* recycle:touch = Yes # shares [public] path = /mnt/raid/public read only = No hide unreadable = No vfs object = recycle recycle:repository = /mnt/raid/.recycle/Public/%u/%I/%m/%S recycle:keeptree = Yes recycle:versions = Yes recycle:maxsize = 0 recycle:exclude = Thumbs.db *.tmp *.temp ~$* [TEST] path = /mnt/raid/public read only = No hide unreadable = yes vfs object = recycle recycle:repository = /mnt/raid/.recycle/TEST/%u/%I/%m/%S recycle:keeptree = Yes recycle:versions = Yes recycle:maxsize = 0 recycle:exclude = Thumbs.db *.tmp *.temp ~$* [Resources] path = /mnt/raid/Resources read only = No hide unreadable = yes vfs object = recycle recycle:repository = /mnt/raid/.recycle/Resources/%u/%I/%m/%S recycle:keeptree = Yes recycle:versions = Yes recycle:maxsize = 0 recycle:exclude = Thumbs.db *.tmp *.temp ~$* [printers] path = /var/spool/samba printable = yes printing = CUPS [print$] path = /mnt/raid/PrinterDrivers comment = Printer Drivers writeable = yes And my /etc/krb5.conf [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] default_realm = TEST.SG default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES-CBC-MD5 default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES-CBC-MD5 preferred_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES-CBC-MD5 dns_lookup_realm = false dns_lookup_kdc = false forwardable = true renewable = true ticket_lifetime = 365d renew_lifetime = 1000d [realms] TEST.SG = { kdc = 4ecapsvsg6.test.sg:88 admin_server = 4ecapsvsg6.test.sg:749 default_domain = test.sg } [domain_realm] .test.sg = TEST.SG test.sg = TEST.SG [appdefaults] pam = { debug = false forwardable = true renewable = true ticket_lifetime = 365d renew_lifetime = 1000d krb4_convert = false } So how do i 'sanitized' 4ecapsvsg6 ? -Adhi- ---CUT--->>~# smbclient //4ecapsvsg6/netlogon -UAdministrator%"Pa$$worD" -c 'ls' >>session setup failed: NT_STATUS_NO_LOGON_SERVERS >> >>without it i cannot continue join the domain >> >>can you help me out here ? >> > >I think we are going have to see the smb.conf (sanitized) from '4ecapsvsg6' > >How did you provision the domain, what command did you use ? > >Rowland
OK i figured how to sanitized In smb.conf i change to netbios name = 4example from # netbios name = 4ecapsvsg6 Then i try :~# sudo /usr/bin/smbclient -L 4example -U% Connection to 4example failed (Error NT_STATUS_UNSUCCESSFUL) :~# sudo /usr/bin/smbclient -L 4capsvsg6 -U% Connection to 4capsvsg6 failed (Error NT_STATUS_UNSUCCESSFUL) But when i try :~# sudo /usr/bin/smbclient -L localhost -U% Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED) ~# smbclient -L 10.153.64.5 -U% Connection to 10.153.64.5 failed (Error NT_STATUS_CONNECTION_REFUSED) CMIIW, but this means that computer does recognize localhost and IP Address, but connection refused, Instead of 4example / 4ecapsvsg6 which doesn't recognize because Status Unsuccessful So that means i did something wrong in smb.conf ? -Adhi-