Članak podrazumeva da je samba server već instaliran na računaru, i odgovarajući portovi propušteni kroz firewall.
useradd testuser -s=/sbin/nologin
). Korisnicima ne treba ni /home direktorijum što se postiže dodavanjem -M opcije u komandusmbpasswd -a <korisnički_nalog>
/etc/samba/smb.conf
tako da se odrede deljeni folderichcon -t samba_share_t <put_do_deljenog_direktorijuma>
systemctl restart smb.service
, systemctl restart nmb.service
)
Izvori:
Setting up Samba as Domain Member
Troubleshooting Samba Domain Members
Idmap config rid
# ps ax | egrep "samba|smbd|nmbd|winbindd"
smb.conf
fajla otkriva se komandom: # smbd -b | grep "CONFIGFILE" CONFIGFILE: /usr/local/samba/etc/samba/smb.conf
Preporuka je pre izmena smb.conf
fajla napraviti bekap istog.
*.tdb
odnosno *.ldb
fajlovima koje treba obrisati dobija se komandom: # smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR" LOCKDIR: /usr/local/samba/var/lock/ STATEDIR: /usr/local/samba/var/locks/ CACHEDIR: /usr/local/samba/var/cache/ PRIVATE_DIR: /usr/local/samba/private/
nslookup
komandom. # nslookup ASRV.home.local Server: 192.168.0.6 Address: 192.168.0.6#53 Name: ASRV.home.local Address: 192.168.0.6
Reverse Lookup
# nslookup 192.168.0.6 Server: 192.168.0.6 Address: 192.168.0.6#53 6.0.168.192.in-addr.arpa name = ASRV.home.local.
Resolving SRV Records
# nslookup Default Server: 192.168.0.6 Address: 192.168.0.6 > set type=SRV > _ldap._tcp.home.local. Server: 192.168.0.6 Address: 192.168.0.6 _ldap._tcp.home.local SRV service location: priority = 0 weight = 100 port = 389 svr hostname = asrv.home.local home.local nameserver = asrv.home.local asrv.home.local internet address = 192.168.0.6
smb.conf
[global] workgroup = HOME server string = %h server # Milano, ovo sam podašavao po uputstvima sa samba Wiki stranice # https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member workgroup = HOME security = ADS realm = HOME.LOCAL server string = %h server winbind refresh tickets = Yes vfs objects = acl_xattr map acl inherit = Yes store dos attributes = Yes dedicated keytab file = /etc/krb5.keytab kerberos method = secrets and keytab # Za potrebe testuranja winbind enum users = yes winbind enum groups = yes # Ne treba nam deljenje printera load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes
# net ads join -U administrator Enter administrator's password: Passw0rd Using short domain name -- HOME Joined 'SAMBASRV' to dns domain 'home.local'
winbind
u konfiguracioni fajl /etc/nsswitch.conf
, obavezno iza files
sekcije: passwd: files winbind group: files winbind
Dodaje se samo u passwd
i group
sekcije, nikako u shadow
sekciju.
systemctl start smbd systemctl start nmbd systemctl start winbindd
winbindd
ping-a # wbinfo --ping-dc checking the NETLOGON for domain[HOME] dc connection to "ASRV.HOME.LOCAL" succeeded
# getent passwd HOME\\milano HOME\milano:*:10000:10000:milano:/home/milano:/bin/bash
# chown "HOME\\milano:HOME\\domain users" file.txt