May 26, 2009

Konfigurasi samba PDC another way with bash script

Base on
Conversation with xxxxxxxxxxxx at 5/26/2009 8:42:09 AM on xxxx (yahoo)
(5/25/2009 8:20:26 PM)xxxxxx: kirimin ke emailku perbedaan jaringan di linux dan windows, trus kenapa jaringan lebih baik kalau di linux? tak tunggu yah. pake notepad aeee OKEH. sisan tutorial samba sebagai PDC okeh (domain controler) matursuwun [ minimal dua user ajah di sambanya ]

Dari permintaan seorang teman aku akhirnya nulis lagi sekalian tuk menuhin blog gitu.. juga nostalgia dengan bash script. :D dah hampir lupa soale. maklum pake W******* teyusss.. heehhe

so.... pembahasan akan mencakup tentan PDC dengan samba ...( jadi inget waktu kuliah )..
lets begin

Dengan Script bash
1. Siapkan peralatan tempur
2. Samba ready :D silahkan di install dulu samba, samba-common, samba-client
3. Karena script menggunakan dialog, install terlebih dahulu pakage : dialog (1.1-20071028-3)
4. Download script nya disini http://www.ziddu.com/download/4906070/samba_pdc.rar.html
5. Extrak samba_pdc.rar
6. Kasih permisi execusi pada file samba_pdc.sh :

chmood +x samba_pdc.sh

7. Jalankan script

./samba_pdc.sh

8. Ikuti petunjuk yang ada discript
9. Semoga berhasil, akibat dari script adalah tanggungan sendiri- sendiri.
10. Jika script eror kasih comment ya hehehehehe:D . Maklum masih belajar.....
see:


Manual
1. samba ready :D silahkan di install dulu samba, samba-common, samba-client

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

[global]
workgroup = brekele.inc --> ubah sesuai yang kita mau
netbios name = brekele.inc --> ubah sesuai yang kita mau
server string = Open Source --> ubah sesuain yang kita mau
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 = 15000-20000
idmap gid = 15000-20000

# sync smb passwords woth linux passwords
passwd program = /usr/bin/passwd %u
passwd chat = *EntersnewsUNIXspassword:* %n
*RetypesnewsUNIXspassword:* %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/

4. Lalu restart samba

/etc/init.d/samba restart

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

hosts: files dns
menjadi :
hosts: files wins dns

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

127.0.0.1 localhost
***.***.***.*** client1
***.***.***.*** client2


7. Tambahkan user root kedalam user samba :

smbpasswd -a root
New SMB password:
Retype new SMB password:

8. buat file /etc/samba/smbusers lalu jalankan :

echo "root = Administrator" > /etc/samba/smbusers


mengartikan bahwa user root = user administrator pada windows

9. Silahkan test settingan dengan :

smbclient -L localhost -U%

kalo gak ada eror berarti jalan :D


10. lalu setup domain group untuk windows :

net groupmap add ntgroup="Domain Admins" unixgroup=root
net groupmap add ntgroup="Domain Users" unixgroup=users
net groupmap add ntgroup="Domain Guests" unixgroup=nogroup


nb jika groupmap telah dibuat add diganti dengan modify atau lihat man page

11. tambah user linux dan user samba dengan cara :
user linux :

useradd singo -m -G users

user samba :

smbpasswd -a singo #singo=sesuai selera


12. 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/


13. 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


14. lalu restart samba kembali :

/etc/init.d/samba restart

15. Langkah terakhir join kan kompy windows ke PDC linux , dengan cara :
- Klik kanan pada My Computer
- Pilih Computer Name - Change
- Masukan domain PDC pada bagian domain
- Akan muncul windows yang meminta memasukan user dan password, pada langkah ini masukan user root dan password samba untuk user root
- Klik OK
- Akan muncul bahwa kita sukses menjoinkan mesin windows ke PDC linux

thank's

referensi :
http://ubuntulinux.or.id/blog/2006/10/06/konfigurasi-samba-sebagai-pdc-di-ubuntu-server

May 19, 2009

Convert To All Format (avi, flv, 3gp, mpeg)

hi... all, i am back to write some thing in my mind.... :D about convert avi, flv or 3gp to another format.

Before the day, i just wrote about streaming video, and now this can be support to streaming.

As i know, the basic to streaming is what you want to stream, and to stream videos maybee you want to convert any video format to same format. for exempla if you want stream a video that can be access via Mobile, you need video in 3gp format or maybee you want to make it became a FLV format. It is up to you.....

like usualy i will use a software that can be apply in multi platform. Yes.... i will use ffmpeg to convert video format. This software can you find in here for detail see this page here

Now lets begin.

- After download finish you can install or extrak. the poin is we can use this tool :D
- B T W in this sample i use in windows version, but for other version is similiar... :D
- Open "console" or "command promt"(then go to directory where ffmpeg is placed) in windows like this



or you can ask uncle google .. :D and this is a view sample command that you can use:
> ffmpeg -i original_file -y destination
that is the basic command.

another command...
- Convert avi to 3gp

ffmpeg -i inputfile.avi -s qcif -vcodec h263 -acodec aac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
ffmpeg -i input.avi -vcodec mpeg4 -acodec amr_nb -ar 8000 -ac 1 -ab 32 -s qcif -r 10 -y test.3gp

- Convert flv to 3gp
ffmpeg -i exemple.flv -s qcif -vcodec h263 -acodec mp3 -ac 1 -ar 8000 -r 25 -ab 32 -y output-file.3gp

- Take some pictures from video
ffmpeg -i exemple.flv -deinterlace -an -ss 00:00:03 -t 00:00:01 -r 1 -y -vcodec mjpeg -f mjpeg demo.jpg

- Convert avi to Flv
ffmpeg -i exemple.avi -ar 22050 -ab 32 -f flv -s 320x240 yourvideo.flv


hope this can help......

:D

May 14, 2009

Trobos Firewall dengan proxy....

hhh.... gimana memulainya ya ..........
wokey .. sebenarnya ini mungkin dah banyak diketahui oleh khalayak ramai yang internet nya mentok gak bisa akses sana situ. Dan itu pun sekarang ku alami karena mr. firewall yang terbangun dari tidurnya disaat jam kerja sudah di mulai.

Nah cukup sebagai permulaan dan kita lanjut lagi.
Di beberapa kantor yang mungkin koneksi Internet nya terlalau dimanage, mungkin ada sebagian situs yang tidak dapat diakses melalui kompute. Hal ini mungkin dapat didasarkan pada berbagai alasan dan pertimbangan.

Pertimbangan yang dapat dijadikan alasan adalah untuk menghemat bandwidht. Tapi sebagai orang yang pernah mengatur hal seperti itu, "saya akan membatasi beberapa situs yang berat supaya saya bisa akses lebih cepat, main game online gak putus - putus dll.. ( rahasia admin).

Persiapan nya cukup simpel dan mudah. kita cuman membutuhkan proxy dan sedikit settingan conneksi di browser kita... hheheheheh.

OKE lanjut..
1. Sebagai langkah awal kita bisa mendapatkan proxy di situs situs penyedia layanan proxy list
(bisa ditanyakan ma om Google.... ) tapi saya menggunakan bantuan situs di sini


2. Cari proxy yang masih bekerja.
3. Begitu dapat, set proxy server browser kita dengan proxy tersebut
=> Internet Explorer
tool>Internet Option>Connections> LAN setting


=> Mozila firefox
tools>Option>Advanced>Network>Settings




May 12, 2009

3gp Streaming Server ( -Video On Demand- )

Streaming, maybee this word is not strange any more in our ear. Now many web have been implemanted this technology.

Streaming media
is multimedia that is constantly received by, and normally presented to, an end-user while it is being delivered by a streaming provider (the term "presented" is used in this article in a general sense that includes audio or video playback). The name refers to the delivery method of the medium rather than to the medium itself. The distinction is usually applied to media that are distributed over telecommunications networks, as most other delivery systems are either inherently streaming (e.g. radio, television) or inherently non-streaming (e.g. books, video cassettes, audio CDs). The verb 'to stream' is also derived from this term, meaning to deliver media in this manner. (sumber : http://en.wikipedia.org/wiki/Streaming_media )

To distributed a media like video or audio we need server as know as streaming server. And for free we will use Darwin Streaming Server. Why ..?
While sharing the same code base as QuickTime Streaming Server, Darwin Streaming Server is an open source project intended for developers who need to stream QuickTime and MPEG-4 media on alternative platforms such as Windows, Linux, and Solaris, or those developers who need to extend and/or modify the existing streaming server code to fit their needs. Darwin Streaming Server is only supported by the open source community and is not eligible for technical support from Apple. Apple hosts a number of email discussion lists for Darwin Streaming Server users and developers to share ideas and discuss deployment scenarios.
QuickTime Streaming Server (QTSS) is Apple's commercial streaming server delivered as part of Mac OS X Server. QTSS provides users with enhanced administration and media management tools as a result of the tight integration with Mac OS X Server; these tools are not available as part of the open source project. Technical support is available for QTSS as part of the AppleCare support plans provided for Mac OS X Server and Xserve.
Both DSS and QTSS are built on a core server that provides state of the art quality of service features with Skip protection and Instant-On, and support for the latest digital media standards, MPEG-4 and 3GPP. (sumber : http://developer.apple.com/opensource/server/streaming/index.html )

we will use the Windows version, for other version you can see in the manual book. and this is the step...
1. Download DarwinStreamingSrvr5.5.5 in here this need request user.
2. This package is self extracktor, so run it until all finised
3. Use comand line : start > run then type cmd


4. Go to directory Darwin in this example is :

5. Run " install.bat " by typing in command without quotes.
6. Input user admin and password for web interface. and instalation is done.
7. Now you can configure your server by accessing " http://localhost:1220/ "


8. first thing to do is make directory default for video directory. This menu store in menu " General Settings "
9. At lease but not last we can access video with address :rtsp://localhost/test.3gp on yuor player.
so enjoy the video..... or we can make web base interface to acces thi movie video.......

salam cayooo.......
pareng..................