Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Results 1 to 14 of 14
  1. #1
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    tanya script executable terminal di ubuntu

    para master sekalian...mohon bantuannya,
    nubie banget nih...

    mau bikin script di ubuntu untuk matiin (shutdown) mikrotik dari ubuntu,tp gak tau gimana caranya.Click here to enlarge
    baru tau mikrotik gak boleh asal cabut colokan,harus shutdown dl,berhubung sering mati lampu,kadang gak sempat buka winbox.pcnya pake ubuntu.maunya bikin script terminal aja yg bs di execute utk nyuruh mikrotiknya shutdown.kalo dari terminal kan pake perintah telnet (ip address mikrotik)
    /system shutdown
    /y

    bs gak ya perintah ini dibikin jd 1 file executable di ubuntu,jd utk matiin mikrotiknya tinggal klik 2x file scriptnya,dr ubuntu...trus shutdown ubuntunya,jd bs hemat waktu...hehe.
    tolong ya para master sekalian yg paham script di ubuntu,ditunggu bantuannya dan pencerahannya

    atau kalo blh,script yg nyuruh mikrotik shutdown dl trus langsung shutdown sendiri ubuntunya....hehe sorry ngerepotin

    trima kasih sebelumnya

  2. The Following User Says Thank You to ordinary_people For This Useful Post:


  3. #2
    Status
    Offline
    mattnux's Avatar
    Forum Guru
    Join Date
    Jun 2008
    Location
    jakarta
    Posts
    1,255
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)


    sering2 main kesitu dulu gan, pasti bisa koq

  4. The Following 2 Users Say Thank You to mattnux For This Useful Post:


  5. #3
    Status
    Offline
    akbar_lana's Avatar
    VIP Member
    Join Date
    Aug 2007
    Location
    Jakarta, Indonesia, Indonesia
    Posts
    735
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    coba pake cara ini bro di Ubuntu

    apt-get install expect

    buat script di ubuntu:
    1. vim /usr/local/bin/mkshutdown
    2. Edit file script di bawah ini
    Code:
    #!/usr/bin/expect
    
    spawn "telnet" "ip.mikrotik" "port.telnet"
    
    expect "Login:"
    send "youruser\r"
    expect "Password:"
    send "yourpassword\r"
    expect ">"
    send "/system shutdown"
    3. chmod +x /usr/local/bin/mkshutdown

    DONE

    Silahkan di coba dan di pelajari script di atas....mudah2an berhasil...Click here to enlarge

  6. The Following 2 Users Say Thank You to akbar_lana For This Useful Post:


  7. #4
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by akbar_lana Click here to enlarge
    coba pake cara ini bro di Ubuntu

    apt-get install expect

    buat script di ubuntu:
    1. vim /usr/local/bin/mkshutdown
    2. Edit file script di bawah ini
    Code:
    #!/usr/bin/expect
    
    spawn "telnet" "ip.mikrotik" "port.telnet"
    
    expect "Login:"
    send "youruser\r"
    expect "Password:"
    send "yourpassword\r"
    expect ">"
    send "/system shutdown"
    3. chmod +x /usr/local/bin/mkshutdown

    DONE

    Silahkan di coba dan di pelajari script di atas....mudah2an berhasil...Click here to enlarge
    belum sempat nyoba,tapi thank you banget bro mau membantu,kalo udah gak repot pasti aku cobain...hehe soalnya kalo ada yg kurang mau minta revisi..maklum nubie abisClick here to enlarge sekali lagi thank you

  8. The Following User Says Thank You to ordinary_people For This Useful Post:


  9. #5
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    bro akbar_lana,udah aku coba,tp dasar nuwbie
    gak ngertiClick here to enlarge

    waktu pake perintah vim itu kita masukke file mk shutdown ya?
    abis ketik semua perintahnya,gak tau lg mau di apain. stuck smp di
    send /system shutdown

    untuk kembali ke terminal biasa gimana caranya ya?
    spy bs ngelanjutin ke langkah ketiga.

    kalo boleh tlg dijelaskan step by stepnya ya bro.Click here to enlarge
    buta sama skali linux...hehe
    trims sebelumnya

  10. The Following User Says Thank You to ordinary_people For This Useful Post:


  11. #6
    Status
    Offline
    akbar_lana's Avatar
    VIP Member
    Join Date
    Aug 2007
    Location
    Jakarta, Indonesia, Indonesia
    Posts
    735
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    Click here to enlarge Originally Posted by ordinary_people Click here to enlarge
    bro akbar_lana,udah aku coba,tp dasar nuwbie
    gak ngertiClick here to enlarge

    waktu pake perintah vim itu kita masukke file mk shutdown ya?
    abis ketik semua perintahnya,gak tau lg mau di apain. stuck smp di
    send /system shutdown

    untuk kembali ke terminal biasa gimana caranya ya?
    spy bs ngelanjutin ke langkah ketiga.

    kalo boleh tlg dijelaskan step by stepnya ya bro.Click here to enlarge
    buta sama skali linux...hehe
    trims sebelumnya
    tuk keluar dari vim dan save ketik :wq bro atau klo mo pake editor yang lain bisa gunain pico atau nano untuk ganti vim

  12. The Following 2 Users Say Thank You to akbar_lana For This Useful Post:


  13. #7
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    bro akbar_lana,trims bantuannya,newbie udah berhasil menyelesaikan panduan di atas,tp ada 2 pertanyaan lg
    1. setelah perintah :
    send "/system shutdown"
    gak perlu konfirm "y" ya?
    kalo telnet lwt terminal kan terakhir hrs milih y
    2. utk ngejalanin perintahnya gimana bos?Click here to enlarge
    apa masuk ke direktorinya trus klik 2x trus pilih run in terminal....ato gimana,..hehe gak ngertiClick here to enlarge
    kalo mau buat shortcut taru di desktop bs gak ya?biar gampang ngaksesnya....(kalo bs gimana caranya ya?

    trims sebelumnya bro

  14. The Following User Says Thank You to ordinary_people For This Useful Post:


  15. #8
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    lapor juragan
    aku coba klik 2x file mkshutdown trus pilih run interminal
    trus muncul window terminalnya mikrotik (seperti new terminal di winbox)

    tp berapa detik kemudian ilang n mikrotiknya sendiri aku cek di winbox,masih idup,blm berhasil shutdown...kalo dari penampakannya tuh kayaknya udah berhasil telnet ya,cm perintah shutdownnya blm jalan..tolong di kasih pencerahan lg ya bro

    cara upload gambar gimana ya?mau upload screenshotnya tp gak tau caranya....hehehe newbie abizz


    makasih sebelumnya

  16. The Following User Says Thank You to ordinary_people For This Useful Post:


  17. #9
    Status
    Offline
    putra_maiwa's Avatar
    Forum Guru
    Join Date
    Sep 2009
    Posts
    1,298
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by ordinary_people Click here to enlarge
    lapor juragan
    aku coba klik 2x file mkshutdown trus pilih run interminal
    trus muncul window terminalnya mikrotik (seperti new terminal di winbox)

    tp berapa detik kemudian ilang n mikrotiknya sendiri aku cek di winbox,masih idup,blm berhasil shutdown...kalo dari penampakannya tuh kayaknya udah berhasil telnet ya,cm perintah shutdownnya blm jalan..tolong di kasih pencerahan lg ya bro

    cara upload gambar gimana ya?mau upload screenshotnya tp gak tau caranya....hehehe newbie abizz


    makasih sebelumnya
    pake image hosting... atau lainya

  18. The Following User Says Thank You to putra_maiwa For This Useful Post:


  19. #10
    Status
    Offline
    akbar_lana's Avatar
    VIP Member
    Join Date
    Aug 2007
    Location
    Jakarta, Indonesia, Indonesia
    Posts
    735
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    Click here to enlarge Originally Posted by ordinary_people Click here to enlarge
    lapor juragan
    aku coba klik 2x file mkshutdown trus pilih run interminal
    trus muncul window terminalnya mikrotik (seperti new terminal di winbox)

    tp berapa detik kemudian ilang n mikrotiknya sendiri aku cek di winbox,masih idup,blm berhasil shutdown...kalo dari penampakannya tuh kayaknya udah berhasil telnet ya,cm perintah shutdownnya blm jalan..tolong di kasih pencerahan lg ya bro

    cara upload gambar gimana ya?mau upload screenshotnya tp gak tau caranya....hehehe newbie abizz


    makasih sebelumnya
    mungkin coba di tambahkan pada scriptnya pada bagian di bawah:
    send "/system shutdown"

    Code:
    send "/system shutdown"
    expect ":"
    send "y"
    apabila belom berhasil coba script-nya di ubah seperti ini bos
    Code:
    #!/usr/bin/expect
    
    spawn "telnet" "ip.mikrotik" "port.telnet"
    
    expect "Login:"
    send "youruser\r"
    expect "Password:"
    send "yourpassword\r"
    expect ">"
    send "/system shutdown\r"
    expect ":"
    send "y\r"
    ditambahkan karakter "\r" pada bagian send data, artinya "\r" = enter
    Last edited by akbar_lana; 29-03-2010 at 00:42.

  20. The Following User Says Thank You to akbar_lana For This Useful Post:


  21. #11
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    bro akbar_lana banyak terima kasih untuk anda,sudah meluangkan waktu untuk membantu sesamamu yang kurang pintar ini.
    aku udah nyoba lg,tp masih belum bs juga
    sudah mengikuti semua saran,tp masih blm berhasil...seluruh scriptnya editan yang terakhir spt ini


    #!/usr/bin/expect

    spawn "telnet" "192.168.x.x" "23"

    expect "Login:"
    send "xxxxxx\r"
    expect "Password:"
    send "xxxx\r"
    expect ">"
    send "/system shutdown\r"
    expect ":"
    send "y\r"


    ada kemajuan sih,telnet berhasil,n khususnya edit yg terakhir ini,muncul tulisan :
    shutdown, yes? (y/n)

    tapi langsung ilang (terminalnya tertutup)..kirain berhasil, tp ternyata ,mikrotiknya msh on,kira2 ada yg salah atau kurang?help ya bro...gak ngerti Click here to enlarge

    tampilan full terminalnya seperti ini bro:
    ada muncul tulisan aneh di bawah logo mikrotik
    ^[[?62;9;c^[[24;3R
    menu shutdown muncul dibawahnya lg,tp cm 1-2 dtk.,(gak sempat copy)


    Connected to 192.168.x.x.
    Escape character is '^]'.

    MikroTik v4.2
    Login: xxxxxx
    Password:








    MMM MMM KKK TTTTTTTTTTT KKK
    MMMM MMMM KKK TTTTTTTTTTT KKK
    MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK
    MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK
    MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK
    MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK

    MikroTik RouterOS 4.2 (c) 1999-2009

    ^[[?62;9;c^[[24;3R


    trima kasih sebelumnya bro

  22. The Following User Says Thank You to ordinary_people For This Useful Post:


  23. #12
    Status
    Offline
    akbar_lana's Avatar
    VIP Member
    Join Date
    Aug 2007
    Location
    Jakarta, Indonesia, Indonesia
    Posts
    735
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    Click here to enlarge Originally Posted by ordinary_people Click here to enlarge
    bro akbar_lana banyak terima kasih untuk anda,sudah meluangkan waktu untuk membantu sesamamu yang kurang pintar ini.
    aku udah nyoba lg,tp masih belum bs juga
    sudah mengikuti semua saran,tp masih blm berhasil...seluruh scriptnya editan yang terakhir spt ini


    #!/usr/bin/expect

    spawn "telnet" "192.168.x.x" "23"

    expect "Login:"
    send "xxxxxx\r"
    expect "Password:"
    send "xxxx\r"
    expect ">"
    send "/system shutdown\r"
    expect ":"
    send "y\r"


    ada kemajuan sih,telnet berhasil,n khususnya edit yg terakhir ini,muncul tulisan :
    shutdown, yes? (y/n)

    tapi langsung ilang (terminalnya tertutup)..kirain berhasil, tp ternyata ,mikrotiknya msh on,kira2 ada yg salah atau kurang?help ya bro...gak ngerti Click here to enlarge

    tampilan full terminalnya seperti ini bro:
    ada muncul tulisan aneh di bawah logo mikrotik
    ^[[?62;9;c^[[24;3R
    menu shutdown muncul dibawahnya lg,tp cm 1-2 dtk.,(gak sempat copy)


    Connected to 192.168.x.x.
    Escape character is '^]'.

    MikroTik v4.2
    Login: xxxxxx
    Password:








    MMM MMM KKK TTTTTTTTTTT KKK
    MMMM MMMM KKK TTTTTTTTTTT KKK
    MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK
    MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK
    MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK
    MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK

    MikroTik RouterOS 4.2 (c) 1999-2009

    ^[[?62;9;c^[[24;3R


    trima kasih sebelumnya bro
    hehehe...masih belom berhasil ya dicoba ubah lagi bos scriptnya jadi seperti ini:
    Code:
    #!/usr/bin/expect
    
    spawn "telnet" "192.168.x.x" "23"
    
    expect "Login:"
    send "xxxxxx\r"
    expect "Password:"
    send "xxxx\r"
    expect ">"
    send "/system shutdown\r"
    expect "(y/n)"
    send "y\r"
    mudah2an berhasil yang ini dan yang saya bold ialah yg di ubah....Click here to enlarge

  24. The Following User Says Thank You to akbar_lana For This Useful Post:


  25. #13
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge
    bro akbar_lana,
    lapor bos, script yg terakhir

    #!/usr/bin/expect

    spawn "telnet" "192.168.x.x" "23"

    expect "Login:"
    send "xxxxxx\r"
    expect "Password:"
    send "xxxx\r"
    expect ">"
    send "/system shutdown\r"
    expect "(y/n)"
    send "y\r"

    jg belum berhasil,msh sampe muncul perintah shutdown (y/n) sj..gak lanjutmikrotiknya tetap gak mau disuruh bobo..
    dalam betidak-tahuan aku coba utak-utik (bondo nekad) Click here to enlarge
    akhirnya nemu expect yg terakhir tdk dipake..
    pas dijalanin eh tulisan di bawah logo mikrotik yg kemaren:
    ^[[?62;9;c^[[24;3R
    berubah jadi username yg dipake login (kayak yg di terminal),next eh ternyata mikrotiknya berhasil di-shutdownClick here to enlarge

    banyak terima kasih ya bro udah meluangkan waktu n kesabaran buat bantu newbie yg tak berpengalaman kayak saya,realy appreciate thatClick here to enlarge
    ternyata di dunia maya jg banyak orang baik heheheClick here to enlarge
    sayang ya kalo bumi cuma sampe 2012..wakakakaka

    ngomong2 bro tanya lg ya biar terang benderang (maklum oon)

    perintah yg terakhir
    chmod +x /usr/local/bin/mkshutdown
    itu utk apa ya fungsinya?kalo perintah ini gak dijalankan apa yg terjadi?
    trims ya bro
    Click here to enlargeClick here to enlargeClick here to enlarge

  26. #14
    Status
    Offline
    ordinary_people's Avatar
    Baru Gabung
    Join Date
    Nov 2009
    Posts
    18
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    gimana caranya bikin shortcutnya?

    tanya lg...
    file mkshutdown-nya iini gak bs dibuat shortcut ya bos?
    maunya taruh di desktop jd gampang ngaksesnya,tp gak bs dibuat shortcut.
    mau di-copy ke desktop jg malah jd file text biasa,hehe dasar newbie
    mohon bantuannya ya spara enior sekalainClick here to enlarge
    trima kasih sebelumnya

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. tanya script executable terminal
    By ordinary_people in forum Scripting @ Mikrotik
    Replies: 4
    Last Post: 20-03-2010, 09:20
  2. [Tanya] Arti script berikut di Mangle
    By bungbeno in forum Scripting @ Mikrotik
    Replies: 0
    Last Post: 18-02-2010, 14:04
  3. Terminal Server/ Terminal Service
    By guztof in forum General Networking
    Replies: 2
    Last Post: 05-09-2009, 03:42
  4. Tanya:Script
    By arcadeva in forum Scripting @ Mikrotik
    Replies: 4
    Last Post: 15-06-2009, 10:53
  5. Replies: 2
    Last Post: 29-04-2009, 13:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •