[Tutor] PDC ubuntu (test on ubuntu server 9.04)

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
aleardho
Posts: 27
Joined: 05 Jan 2010, 09:33
Location: Indonesia
Contact:

[Tutor] PDC ubuntu (test on ubuntu server 9.04)

Postby aleardho » 08 Jan 2010, 15:11

Kalau-kalau ada yang butuh, tutornya dah ogut singkat sesingkat2nya :D
=======================================================================

1. root@ucok-svr:apt-get install samba winbind

2. edit konfigurasi samba tapi jangan lupa yang asli di backup dulu

root@ucok-svr:cp /etc/samba/smb.conf /etc/samba/smb.conf.org
root@ucok-svr:nano /etc/samba/smb.conf

Isi file samba jadi seperti ini :
---------------------------------------------------------------

#Samba PDC Configuration For ucok
#By Ale Ardho Jan,07-2010

[global]
workgroup = ucok
netbios name = ADserver
server string = %h server (Samba, Ubuntu)
username map = /etc/samba/smbusers
name resolve order = wins bcast hosts
preferred master = yes
wins support = yes

#Domain
domain logons = yes
#logon path = \\%L\profiles\%U
logon path = \\%N\%U\profiles
logon drive = Z:
logon home = \\%N\%U
logon script = logon.cmd

#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 = 1000-65000
idmap gid = 1000-65000
idmap backend = idmap_rid:ucok=1000-65000

#Authentikasi
security = user
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:*%n\n *Retype\snew\sUNIX\spassword:* %n
passwd chat debug = yes
unix password sync = yes
encrypt passwords = true
pam password change = yes
map to guest = bad user
obey pam restrictions = yes

#Set the loglevel
log level = 3
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
panic action = /usr/share/samba/panic-action %d

#Misc
socket options = TCP_NODELAY
domain master = yes
template shell = /bin/bash
winbind enum groups = yes
winbind enum users = yes


[homes]
comment = Home
valid users = %S
read only = no
browseable = 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
browseable = no

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


===================================================================

3. Buat direktori samba di home :

root@ucok-svr:mkdir /home/samba
root@ucok-svr:mkdir /home/samba/profiles
root@ucok-svr:mkdir /home/samba/netlogon
root@ucok-svr:mkdir /var/spool/samba
root@ucok-svr:chmod 777 /var/spool/samba
root@ucok-svr:chown -R root:users /home/samba
root@ucok-svr:chmod -R 771 /home/samba
root@ucok-svr:mkdir /home/shares/allusers
root@ucok-svr:chown -R root:users /home/shares/allusers
root@ucok-svr:chmod -R 755 /home/shares/allusers

4. Edit nsswitch.conf

root@ucok-svr:nano /etc/nsswitch.conf

ganti baris hosts menjadi
hosts: files wins dns

5. tambah pc client di hosts

root@ucok-svr:nano /etc/hosts

127.0.0.1 localhost
192.168.0.3 server
192.168.0.24 pc-ale
dst..

6. Buat user root di samba untuk join domain

root@ucok-svr:smbpasswd -a root

7. tambah user root di smbusers

root@ucok-svr:echo "root=Administrators" > /etc/samba/smbusers

8. setting domain group windows

root@ucok-svr:net groupmap add ntgroup="Domain Admins" unixgroup=root
root@ucok-svr:net groupmap add ntgroup="Domain Users" unixgroup=users

9. Tambah user samba :

root@ucok-svr:useradd ale -m -G users -c "aLe aRdHo"
root@ucok-svr:smbpasswd -a ale

10. Bikin direktori user di profiles :

root@ucok-svr:mkdir /home/samba/profiles/ale
root@ucok-svr:chown ale.users /home/samba/profiles/ale
root@ucok-svr:chmod 700 /home/samba/profiles/ale

11. Restart samba

root@ucok-svr:/etc/init.d/samba restart

12. Join domain windows ke ubuntu

Done....

silahkan ditambahin kalau-kalau ada yang kurang ;)
User avatar
irham
Posts: 2
Joined: 05 Jan 2010, 13:48
Location: Tulungagung, Jombang, Banyuwangi

Re: [Tutor] PDC ubuntu (test on ubuntu server 9.04)

Postby irham » 09 Jan 2010, 15:11

mengomentari dan bertanya untuk langkah yang terakhir

12. Join domain windows ke ubuntu

Berarti maksudnya ubuntu jadi server dengan samba tadi
lalu untuk mengaksesnya (clientnya) menggunakan windows

Nah, bagaimana jika client nya juga ubuntu.
komputer client yang terinstall ubuntu, bisa login
dari user sambanya ?
User avatar
snk
Posts: 6
Joined: 23 Jan 2010, 08:35
Location: Surabaya
Contact:

Re: [Tutor] PDC ubuntu (test on ubuntu server 9.04)

Postby snk » 25 Jan 2010, 11:10

mas ale...

tutor PDC nya ok... sudah saya test di ubuntu server 9.10

tapi klo saya login menggunakan root/administrators di windows, knp levelnya masih level user ya?? padahal root sdh masuk "domain admins".. saya jg sdh coba create user baru dengan group root "useradd sonny -m -G root" tapi ketika login di windows levelnya jg masih level user..

knp ya?
User avatar
M3L3R
Posts: 1335
Joined: 18 Jan 2010, 22:40
Location: Jogja
Contact:

Re: [Tutor] PDC ubuntu (test on ubuntu server 9.04)

Postby M3L3R » 25 Jan 2010, 13:48

[quote=aLe]Kalau-kalau ada yang butuh, tutornya dah ogut singkat sesingkat2nya :D
=======================================================================

1. root@ucok-svr:apt-get install samba winbind

2. edit konfigurasi samba tapi jangan lupa yang asli di backup dulu

root@ucok-svr:cp /etc/samba/smb.conf /etc/samba/smb.conf.org
root@ucok-svr:nano /etc/samba/smb.conf

Isi file samba jadi seperti ini :
---------------------------------------------------------------

#Samba PDC Configuration For ucok
#By Ale Ardho Jan,07-2010

[global]
workgroup = ucok
netbios name = ADserver
server string = %h server (Samba, Ubuntu)
username map = /etc/samba/smbusers
name resolve order = wins bcast hosts
preferred master = yes
wins support = yes

#Domain
domain logons = yes
#logon path = \\%L\profiles\%U
logon path = \\%N\%U\profiles
logon drive = Z:
logon home = \\%N\%U
logon script = logon.cmd

#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 = 1000-65000
idmap gid = 1000-65000
idmap backend = idmap_rid:ucok=1000-65000

#Authentikasi
security = user
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:*%n\n *Retype\snew\sUNIX\spassword:* %n
passwd chat debug = yes
unix password sync = yes
encrypt passwords = true
pam password change = yes
map to guest = bad user
obey pam restrictions = yes

#Set the loglevel
log level = 3
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
panic action = /usr/share/samba/panic-action %d

#Misc
socket options = TCP_NODELAY
domain master = yes
template shell = /bin/bash
winbind enum groups = yes
winbind enum users = yes


[homes]
comment = Home
valid users = %S
read only = no
browseable = 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
browseable = no

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


===================================================================

3. Buat direktori samba di home :

root@ucok-svr:mkdir /home/samba
root@ucok-svr:mkdir /home/samba/profiles
root@ucok-svr:mkdir /home/samba/netlogon
root@ucok-svr:mkdir /var/spool/samba
root@ucok-svr:chmod 777 /var/spool/samba
root@ucok-svr:chown -R root:users /home/samba
root@ucok-svr:chmod -R 771 /home/samba
root@ucok-svr:mkdir /home/shares/allusers
root@ucok-svr:chown -R root:users /home/shares/allusers
root@ucok-svr:chmod -R 755 /home/shares/allusers

4. Edit nsswitch.conf

root@ucok-svr:nano /etc/nsswitch.conf

ganti baris hosts menjadi
hosts: files wins dns

5. tambah pc client di hosts

root@ucok-svr:nano /etc/hosts

127.0.0.1 localhost
192.168.0.3 server
192.168.0.24 pc-ale
dst..

6. Buat user root di samba untuk join domain

root@ucok-svr:smbpasswd -a root

7. tambah user root di smbusers

root@ucok-svr:echo "root=Administrators" > /etc/samba/smbusers

8. setting domain group windows

root@ucok-svr:net groupmap add ntgroup="Domain Admins" unixgroup=root
root@ucok-svr:net groupmap add ntgroup="Domain Users" unixgroup=users

9. Tambah user samba :

root@ucok-svr:useradd ale -m -G users -c "aLe aRdHo"
root@ucok-svr:smbpasswd -a ale

10. Bikin direktori user di profiles :

root@ucok-svr:mkdir /home/samba/profiles/ale
root@ucok-svr:chown ale.users /home/samba/profiles/ale
root@ucok-svr:chmod 700 /home/samba/profiles/ale

11. Restart samba

root@ucok-svr:/etc/init.d/samba restart

12. Join domain windows ke ubuntu

Done....

silahkan ditambahin kalau-kalau ada yang kurang ;)



dah mantap kok !! tp klo dikasih screenshot kyknya lebih mantap nuii ... ^_^