Skip to main content

Thread: Samba File server ADS Domain Member easy setup


samba file sharing domain member active directory
on ubuntu 12.04 server

first thread on forum .
lost 2-3 days configure samba lot of pain and
headaches , got done. had configured samba many times ago , way different started simplest configuration , added needed commands make samba
working hadn't time make extensive testing , can
post feedback on thread.

notice don't need write commented # descriptions
@ first define names configuration options:

yourdomain.local - name of domain on local network
kdcserver - same domain server if one, can server's ip address
'username' - user in home directory share folder stay
sambaserver - name of linux server name in /etc/hostname


1. installation of services:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install samba smbfs smbclient
sudo apt-get install krb5-user libpam-krb5 libpam-ccreds auth-client-config
sudo apt-get install winbind


2. edit /etc/krb5.conf domain name (yourdomain.local)
[libdefaults]
default_realm = yourdomain.local
dns_lookup_realm = true
dns_lookup_kdc = true


[realms]
yourdomain.local = {
kdc = kdcserver
# kdcserver full dns name of realm server same domain server , or ip address can a.b.c.d
default_domain = yourdomain.local
}



[domain_realm]
.yourdomain.local = yourdomain.local
yourdomain.local = yourdomain.local



3. edit /etc/samba/smb.conf domain name (yourdomain.local)
realm = yourdomain.local
workgroup = yourdomain
security = ads
preferred master = no
server string = samba file server
encrypt passwords = yes
winbind separator = +
password server = kdcserver # server name , full dns name or ip address a.b.c.d
idmap uid = 10000-99999
idmap gid = 10000-99999
log level = 3
log file = /var/log/samba/log.%m
max log size = 50
#client ntlmv2 auth = yes


# 1 share testing
[testshare]
comment = test share
path = /home/'username'/share # username name of user's home directory
read = no



4. edit /etc/nsswitch.conf # important winbind work !!!

change lines to:

passwd: compat winbind
group: compat winbind
shadow: compat


5. edit /etc/hosts

# sambaserver name of linux server found in /etc/hostname
127.0.0.1 sambaserver sambaserver.yourdomain.local

# ip address , name of domain server , full dns domain
a.b.c.d kdcserver kdcserver.yourdomain.local


6. restart services , join domain
sudo service winbind restart
sudo service smbd restart
sudo kinit administrator@yourdomain.local
# domain must uppercases
- when asks put domain administrator password
sudo net ads join -u administrator@yourdomain.local
- when asks put domain administrator password

7. test
mkdir /home/'username'/share
sudo chmod 777 /home/'username'/share

reboot computer
- after login test wbinfo
sudo wbinfo -g
sudo wbinfo -u


- if ok test local windows machine
if login windows popup problem winbind , put full domain
name/username in login window , password
troubleshooting read logs
cd /var/log/samba
tail -n 50 log.machine-name or other log files



Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] Samba File server ADS Domain Member easy setup


Ubuntu

Comments

Popular posts from this blog

Thread: Can not create raid array: mdadm: no raid-devices specified.

Thread: HOW TO: Package and theme GTK+ / Gtkmm apps in Linux for Windows

Thread: Twinview issues