0% found this document useful (0 votes)
37 views

Samba Server Dengan Primary Domain Controller Di Ubuntu Server

1. The document describes how to set up a Samba server as a primary domain controller (PDC) in Ubuntu. It provides instructions for installing Samba and configuring the /etc/samba/smb.conf file. It also describes adding user accounts, configuring shares, and joining Windows clients to the domain. 2. Directories are created for domain logon, profiles, and shares. The Samba configuration file is edited to define workgroup, shares, and user authentication settings. Users are added to Linux and Samba, and permissions are set on shares. 3. Finally, Windows clients are joined to the domain by providing the domain name and credentials of the administrator account during the

Uploaded by

inoktav
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Samba Server Dengan Primary Domain Controller Di Ubuntu Server

1. The document describes how to set up a Samba server as a primary domain controller (PDC) in Ubuntu. It provides instructions for installing Samba and configuring the /etc/samba/smb.conf file. It also describes adding user accounts, configuring shares, and joining Windows clients to the domain. 2. Directories are created for domain logon, profiles, and shares. The Samba configuration file is edited to define workgroup, shares, and user authentication settings. Users are added to Linux and Samba, and permissions are set on shares. 3. Finally, Windows clients are joined to the domain by providing the domain name and credentials of the administrator account during the

Uploaded by

inoktav
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SAMBA SERVER

DENGAN PRIMARY DOMAIN CONTROLLER


DI UBUNTU SERVER

1. pertama install repository samba dan accesorisnya :


apt-get install samba samba-common samba-doc libcupsys2 winbind smbclient
smbfs

2. Konfigurasi /etc/samba/smb.conf sebagai berikut :


[global]
workgroup = dns.persegi.net –> bisa diganti
netbios name = persegi –> bisa diganti
server string = %h server (Samba, Ubuntu) –> bisa diganti
passdb backend = tdbsam
security = user
username map = /etc/samba/smbusers
name resolve order = wins bcast hosts
domain logons = yes
preferred master = yes
wins support = yes

# Useradd scripts
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u
idmap uid = 50-9999999999
idmap gid = 50-9999999999

# sync smb passwords woth linux passwords


passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
passwd chat debug = yes
unix password sync = yes

# set the loglevel


log level = 3

[homes]
comment = Home
valid users = %S
read only = no
browsable = no

[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
admin users = Administrator
valid users = %U
read only = no

[profile]
comment = User profiles
path = /home/samba/profiles
valid users = %U
create mode = 0600
directory mode = 0700
writable = yes
browsable = no
3. Buat beberapa direktori berikut sebagai domain logon dan profile :
mkdir /home/samba
mkdir /home/samba/netlogon
mkdir /home/samba/profiles
mkdir /var/spool/samba
chmod 777 /var/spool/samba/
chown -R root:users /home/samba/
chmod -R 771 /home/samba/
touch /home/samba/netlogon/logon.cmd

File /home/samba/netlogon/logo.cmd dapat diisi script yg bisa jalan pertama kali user login

4. Lalu restart samba


/etc/init.d/samba restart

5. Ubah pada bagian /etc/nsswitch.conf, pada baris :


hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
menjadi :
hosts: files wins mdns4_minimal [NOTFOUND=return] dns mdns4

6. tambahkan beberapa pc clinet pada /etc/hosts :


127.0.0.1 localhost
192.168.0.1 persegi dns.persegi.net
192.168.0.100 opikdesign
192.168.0.101 dhani
192.168.0.102 farah

7. edit file /etc/resov.conf dan tambahkan di baris awal:

nameserver 192.168.0.1

8. restart jaringan :

# /etc/init.d/networking restart

9. Membuat user administrator jaringan, sebaiknya jangan menggunkana user root dan lebih baik
membuat unix-user baru lagi dan unix-group :
# groupadd netadmin
# useradd sysadmin -m -G netadmin –d /home/samba/profiles/sysadmin

# passwd sysadmin
Enter new UNIX password:
Retype new UNIX password:

# smbpasswd -a sysadmin
New SMB password:
Retype new SMB password:

Untuk mempermudah, password unix dan samba lebih baik disamakan.


Kemudian buat group untuk users dan nogroup

# groupadd users
# groupadd nogroup

10. buat file /etc/samba/smbusers dgn isi file :


sysadmin = Administrator

mengartikan bahwa user sysadmin = user administrator pada windows.

11. Test drive, apakah settingan kita dah benar :


# smbclient -L localhost -U%

akan menghasilkan output :


Domain=[DNS.PERSEGI.NET] OS=[Unix] Server=[Samba 3.3.2]

Sharename Type Comment


--------- ---- -------

netlogon Disk Network Logon Service


print$ Disk Printer Drivers
cdrom Disk Samba server's CD-ROM
share Disk Ubuntu File Server Share
IPC$ IPC IPC Service (persegi server (Samba, Ubuntu))

Domain=[DNS.PERSEGI.NET] OS=[Unix] Server=[Samba 3.3.2]

Server Comment
--------- -------
PERSEGI persegi server (Samba, Ubuntu)

Workgroup Master
--------- -------
DNS.PERSEGI.NET PERSEGI

13. lalu kita setup domain group untuk windows, jalankan perintah :
net groupmap add ntgroup="Domain Admins" unixgroup=netadmin
net groupmap add ntgroup="Domain Users" unixgroup=users
net groupmap add ntgroup="Domain Guests" unixgroup=nogroup
14. tambah user linux dan user samba dengan cara :

A. Admin Classes, contoh tambah user “opikdesign” sebagai “administrator”

user linux :
# useradd opikdesign -m -G netadmin –d /home/samba/profiles/opikdesign

user samba :
#smbpasswd -a opikdesign
New SMB password:
Retype new SMB password:

edit file /etc/samba/smbusers dan tambahkan:


opikdesign = Administrator

B. User Classes, contoh tambah user “dhani” sebagai “users”

user linux :
# useradd dhani -m -G users –d /home/samba/profiles/dhani

user samba :
#smbpasswd -a dhani
New SMB password:
Retype new SMB password:

edit file /etc/samba/smbusers dan tambahkan:


dhani = dhani

15. Sekarang tambahan direktori share yang akan dipakai oleh seluruh user :
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/

16. Ubah juga pada /etc/samba/smb.conf, tambahkan baris berikut :


[allusers]
comment = All Users
path = /home/shares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes

17. lalu restart samba kembali :


/etc/init.d/samba restart
18. Terakhir dalah dengan menjoinkan mesin Windows ke PDC Ubuntu kita, dengan cara :

- Click kanan pada My Computer


- Pilih computer name lalu change
- masukan domain PDC pada bagian domain
- kemudian muncul Windows yang meminta memasukan user dan password,
pada langkah ini masukan user sysadmin dan password-nya
- Akan muncul anjran restart klo sukses Join dgn PDC Ubuntu

By:
Taufiq Hidayat
[email protected]

You might also like