Errore di join ad Active Directory
- To: debian-italian@lists.debian.org
- Subject: Errore di join ad Active Directory
- From: Giovanni Bellonio <giovanni.bellonio@infinito.it>
- Date: Tue, 04 Oct 2011 10:21:56 +0200
- Message-id: <[🔎] 4E8AC224.1040802@infinito.it>
- In-reply-to: <4E848067.7020001@fastwebnet.it>
- References: <4E7F5B12.2090304@yahoo.it> <4E7F6247.5020503@fastwebnet.it> <4E7F9AAB.7020000@yahoo.it> <4E8072E5.7020308@fastwebnet.it> <4E80812C.8070807@yahoo.it> <4E8087D7.4080408@fastwebnet.it> <4E809485.9000108@fastwebnet.it> <4E809897.3060109@yahoo.it> <4E81C807.7030208@fastwebnet.it> <4E833041.4080609@fastwebnet.it> <20110928205154.GP1486@ibook99> <4E846D20.2060902@fastwebnet.it> <4E8475CF.4030907@gmail.com> <4E848067.7020001@fastwebnet.it>
Buongiorno a tutta la lista,
la rete aziendale è basata su active directory (windows 2008 R2) e stiamo
migrando da domini locali delle varie sedi ad un unico dominio. Poiché una
delle mie 2 postazioni (VBWKS00008) è una debian testing la volevo mettere
sotto dominio e per questo ho seguito le guide [1], [2], [3], [4].
Ho configurato smb.conf, krb.conf, nsswitch.conf (come sotto riportato), ma
quando provo ad effettuare la join ottengo:
root@VBWKS00008:/home/dpp1058157# net ads join -U dpp1058157
Enter dpp1058157's password:
Failed to join domain: Failed to set account flags for machine account
(NT_STATUS_ACCESS_DENIED)
root@VBWKS00008:/home/dpp1058157# net ads join MIO\/MIAOU\/Computer -W
MIO.DOMINIO.IT -S SERVER01.MIO.DOMINIO.IT -U dpp1058157
Enter dpp1058157's password:
Failed to join domain: Failed to set account flags for machine account
(NT_STATUS_ACCESS_DENIED)
Aggiungo che l'utente con cui effettuo la join (dpp1058157) ha diritti di
amministratore limitati all'unità organizzativa -MIAOU- cui appartengo,
e con
lo stesso utente riesco a gestire i computer con OS di casa microsoft in
tale
unità organizzativa (per portare sotto tale dominio i pc devo prima
creare il
pc sotto MIAOU/Computer e poi cambiare il dominio di appartenenza al
singolo pc).
Di seguito vi invio ciò che ottengo interrogando tramite klist e net ads
sulla mia rete:
root@VBWKS00008:/home/dpp1058157# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: dpp1058157@MIO.DOMINIO.IT
Valid starting Expires Service principal
10/03/11 11:06:05 10/03/11 21:06:10 krbtgt/MIO.DOMINIO.IT@MIO.DOMINIO.IT
renew until 10/04/11 11:06:05
root@VBWKS00008:/home/dpp1058157# net ads info
LDAP server: 10.254.5.200
LDAP server name: SERVER01.mio.dominio.it
Realm: MIO.DOMINIO.IT
Bind Path: dc=MIO,dc=DOMINIO,dc=IT
LDAP port: 389
Server time: lun, 03 ott 2011 12:43:30 CEST
KDC server: 10.254.5.200
Server time offset: 0
root@VBWKS00008:/home/dpp1058157# net ads lookup
Information for Domain Controller: 10.254.5.200
Response Type: LOGON_SAM_LOGON_RESPONSE_EX
GUID: 971a4e0b-b9b9-4cbc-92e3-f81b21c3ddea
Flags:
Is a PDC: yes
Is a GC of the forest: yes
Is an LDAP server: yes
Supports DS: yes
Is running a KDC: yes
Is running time services: yes
Is the closest DC: no
Is writable: yes
Has a hardware clock: yes
Is a non-domain NC serviced by LDAP server: no
Is NT6 DC that has some secrets: no
Is NT6 DC that has all secrets: yes
Forest: mio.dominio.it
Domain: mio.dominio.it
Domain Controller: SERVER01.mio.dominio.it
Pre-Win2k Domain: MIO
Pre-Win2k Hostname: SERVER01.mio.dominio.it
Server Site Name : CENTRALE
Client Site Name :
NT Version: 5
LMNT Token: ffff
LM20 Token: ffff
Come posso effettuare la join, qualche suggerimento?
_smb.conf:_
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
password server = 10.254.5.200
wins server = 10.254.5.200
auth methods = winbind
encrypt passwords = true
realm = MIO.DOMINIO.IT
workgroup = MIO
netbios name = SERVER01
server string = SERVER01.MIO.DOMINIO.IT
idmap uid = 10000-20000
idmap gid = 10000-20000
# default = NomeShare
os level = 20
security = ads
##preferred master = no
##client use spnego = yes
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
template shell = /bin/bash
template homedir = /home/%U
# server string is the equivalent of the NT Description field
server string = %h server
; wins server = w.x.y.z
dns proxy = no
; name resolve order = lmhosts host wins bcast
; interfaces = 127.0.0.0/8 eth0
; bind interfaces only = yes
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam
obey pam restrictions = yes
# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan
<<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes
########## Domains ###########
; domain logons = yes
; logon path = \\%N\profiles\%U
; logon drive = H:
; logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password
--gecos "" %u
; add machine script = /usr/sbin/useradd -g machines -c "%u machine
account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g
########## Printing ##########
; printing = bsd
; printcap name = /etc/printcap
; printing = cups
; printcap name = cups
############ Misc ############
; include = /home/samba/etc/smb.conf.%m
# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
# domain master = auto
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash
# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
; winbind enum groups = yes
; winbind enum users = yes
# Setup usershare options to enable non-root users to share folders
# with the net usershare command.
# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100
#======================= Share Definitions =======================
[homes]
comment = Home Directories
browseable = no
# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
read only = yes
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you
want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
valid users = %S
# Un-comment the following and create the netlogon directory for Domain
Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
; write list = root, @lpadmin
# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes
# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
_krb5.conf:_
[libdefaults]
default_realm = MIO.DOMINIO.IT
[realms]
MIO.DOMINIO.IT = {
kdc = SERVER01.MIO.DOMINIO.IT
admin_server = SERVER01.MIO.DOMINIO.IT
}
[domain_realm]
.mio.dominio.it = MIO.DOMINIO.IT
mio.dominio.it = MIO.DOMINIO.IT
_nsswitch.conf:_
passwd: files winbind
group: files winbind
shadow: compat
hosts: files dns wins
networks: files dns
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
[1] http://www.ccs.neu.edu/home/battista/articles/winbind/index.html
[2]
http://wiki.professionalconcept.eu/doku.php?id=debian:realizzato:debianactivedirectory
[3]
http://www.enterprisenetworkingplanet.com/netos/article.php/3487081/Join-Samba-3-to-Your--Active-Directory-Domain.htm
[4] http://www.debian-administration.org/articles/340
Reply to: