Back openDesk Edu for a sovereign, open-source education â every vote counts.
Vote nowSave products you love by clicking the heart icon.
Complete guide to the LPI DevOps Tools Engineer certification (701-100): exam objectives, study resources, and how it relates to traditional LPI certifications.
Master LPIC-2 202-450: DNS, web services, NFS, Samba, email, directory services, system security, and troubleshooting with detailed command examples.
Die PrĂŒfung LPIC-3 300: Mixed Environment validiert die FĂ€higkeit, Linux-Systeme in heterogene Netzwerke mit Unix, Windows und Directory Services zu integrieren. Dieser Leitfaden behandelt jedes PrĂŒfungsziel mit Konfigurationsbeispielen, Befehlen und AnsĂ€tzen zur Fehlerbehebung.
Samba stellt Datei- und Druckdienste fĂŒr SMB/CIFS-Clients ĂŒber vier Kern-Daemons bereit:
| Daemon | Zweck |
|---|---|
| smbd | SMB/CIFS Datei- und Druckdienst (TCP 139, 445) |
| nmbd | NetBIOS-Namensdienst und Browsing (UDP 137, 138) |
| winbindd | Authentifizierung und IdentitÀtsauflösung von AD oder LDAP |
| samba-ad-dc | Active Directory Domain Controller Dienst |
Die Hauptkonfigurationsdatei von Samba ist /etc/samba/smb.conf mit zwei Hauptabschnitten:
[global]
workgroup = MYDOMAIN
server string = File Server %v
netbios name = FILESRV
security = user
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 50
[shared]
comment = Shared Documents
path = /srv/samba/shared
browseable = yes
read only = no
guest ok = no
valid users = @staff
create mask = 0664
directory mask = 0775
| Modus | Beschreibung |
|---|---|
| user | Benutzer authentifizieren sich mit lokalen Samba-Benutzerkonten (smbpasswd) |
| domain | Samba authentifiziert sich gegenĂŒber einer Legacy Windows NT Domain PDC |
| ads | Samba tritt einer Active Directory Domain mittels Kerberos bei |
| share | Keine Authentifizierung (veraltet, stattdessen map to guest verwenden) |
apt-get install samba smbclient winbind libnss-winbind libpam-winbind
# Configure /etc/samba/smb.conf
[global]
security = ads
realm = AD.CORP.EXAMPLE.COM
workgroup = AD
netbios name = LINUXSRV
# Join the domain
net ads join -U Administrator
# Verify
net ads testjoin
wbinfo -u # List domain users
wbinfo -g # List domain groups
OpenLDAP bietet einen zentralisierten Directory Service fĂŒr die Benutzerauthentifizierung, AdressbĂŒcher und Konfigurationsdaten.
Modernes OpenLDAP verwendet das config Backend (cn=config) fĂŒr die Online-Konfiguration:
# Install
apt-get install slapd ldap-utils
# After initial configuration, view the config
ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config
| Backend | Beschreibung |
|---|---|
| mdb | Memory-Mapped DB â empfohlen, hohe Performance, kein GröĂenlimit |
| bdb | Berkeley DB â veraltet, nicht empfohlen fĂŒr neue Deployments |
| hdb | Hierarchical BD â veraltete Variante mit Umbenennung von Subtrees auf Eintragsebene |
| ldif | Speichert EintrĂ€ge als LDIF-Dateien â nur fĂŒr Tests |
dn: uid=jdoe,ou=people,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: jdoe
cn: John Doe
sn: Doe
uidNumber: 1001
gidNumber: 100
homeDirectory: /home/jdoe
loginShell: /bin/bash
userPassword: {SSHA}encryptedhash
shadowLastChange: 19000
| Operator | Bedeutung | Beispiel |
|---|---|---|
= | Gleichheit | (uid=jdoe) |
>= | GröĂer oder gleich | (uidNumber>=1000) |
<= | Kleiner oder gleich | (uidNumber<=2000) |
=* | Vorhanden | (mail=*) |
~= | UngefÀhr | (sn~=John) |
& | UND | (&(objectClass=posixAccount)(uidNumber>=1000)) |
| | ODER | (|(objectClass=posixAccount)(objectClass=shadowAccount)) |
! | NICHT | (!(uid=root)) |
ACLs in slapd.conf (oder via olcAccess in cn=config):
dn: olcDatabase={1}mdb,cn=config
changetype: modify
add: olcAccess
olcAccess: to attrs=userPassword
by self write
by anonymous auth
by * none
olcAccess: to *
by self write
by users read
by * none
[libdefaults]
default_realm = AD.CORP.EXAMPLE.COM
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
AD.CORP.EXAMPLE.COM = {
kdc = dc01.ad.corp.example.com
kdc = dc02.ad.corp.example.com
admin_server = dc01.ad.corp.example.com
}
[domain_realm]
.ad.corp.example.com = AD.CORP.EXAMPLE.COM
ad.corp.example.com = AD.CORP.EXAMPLE.COM
# Obtain a ticket
kinit administrator@AD.CORP.EXAMPLE.COM
# List cached tickets
klist
# Destroy tickets
kdestroy
# Create a keytab for a service
ktutil
ktutil: addent -password -p HTTP/srv01.ad.corp.example.com@AD.CORP.EXAMPLE.COM -k 1 -e aes256-cts-hmac-sha1-96
ktutil: wkt /etc/httpd.keytab
ktutil: quit
# Verify keytab
klist -kte /etc/httpd.keytab
FĂŒr einen Webserver, der Kerberos-Authentifizierung nutzt:
<Location /secure>
AuthType Kerberos
AuthName "Kerberos Login"
KrbAuthRealms AD.CORP.EXAMPLE.COM
KrbServicePrincipal HTTP/srv01.ad.corp.example.com
Krb5KeyTab /etc/httpd.keytab
KrbMethodNegotiate On
Require valid-user
</Location>
Winbind löst Windows-Benutzer- und GruppenidentitÀten auf Linux-Systemen auf, indem es das AD via LDAP und Kerberos abfragt.
passwd: compat winbind
group: compat winbind
shadow: compat winbind
[global]
idmap config * : backend = tdb
idmap config * : range = 3000-7999
idmap config AD : backend = rid
idmap config AD : range = 10000-999999
winbind use default domain = yes
winbind offline logon = yes
winbind enum users = no
winbind enum groups = no
template shell = /bin/bash
template homedir = /home/%U
NFSv4 bietet eine Kerberos-basierte Authentifizierung fĂŒr plattformĂŒbergreifendes File-Sharing:
# Serverseitig (/etc/exports)
/srv/nfs4 gss/krb5p(rw,sec=krb5p)
# NFSv4 mit Kerberos aktivieren
nfsconf --set nfsd rdma no
nfsconf --set nfsd vers4.2 y
nfsconf --set nfsd vers4.0 y
nfsconf --set gssd use-gss-proxy y
# Client-Mount
mount -t nfs4 -o sec=krb5p server.example.com:/srv/nfs4 /mnt/nfs
For PAM to use LDAP or Winbind authentication, the pam_ldap or pam_winbind module is configured:
# /etc/pam.d/common-auth
auth [success=1 default=ignore] pam_winbind.so
auth requisite pam_deny.so
auth required pam_permit.so
auth optional pam_cap.so
# Konfiguration testen
testparm
# SMB-KonnektivitĂ€t prĂŒfen
smbclient -L //localhost -U%
# Domain Controller abfragen
net ads info
# Authentifizierung testen
ntlm_auth --username=jdoe --domain=AD
# slapd-Status prĂŒfen
slaptest -v
# Abfrage mit Debugging
ldapsearch -d 1 -x -H ldap://localhost -b dc=example,dc=com
# ACLs prĂŒfen
ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config olcAccess
# AusfĂŒhrliche Authentifizierung
KRB5_TRACE=/dev/stderr kinit user@REALM
# Zeitsynchronisation prĂŒfen (kritisch fĂŒr Kerberos)
chronyc sources
# DNS SRV-Records testen
dig -t SRV _kerberos._tcp.ad.corp.example.com
dig -t SRV _ldap._tcp.ad.corp.example.com
Bereit, dieses Wissen in die Praxis umzusetzen? Die interaktive LPI-Ăbungsplattform auf courses.graphwiz.ai enthĂ€lt ĂŒber 400 realistische Fragen zu den Zertifizierungen LPIC-1, LPIC-2, LPIC-3 und DevOps Tools Engineer â inklusive Lernmodus, zeitgesteuerten PrĂŒfungen, Domain-Auswertungen, Schwachstellenanalysen und Flashcards mit Spaced Repetition.
Jetzt ĂŒben auf courses.graphwiz.ai â