Tampilkan postingan dengan label Server Administration. Tampilkan semua postingan
Tampilkan postingan dengan label Server Administration. Tampilkan semua postingan

Set / Change / Reset the MySQL root password on Ubuntu Linux

Sabtu, 11 Agustus 2012

Tested on
- Ubuntu Linux 7.10 Gutsy Gibbon and MySQL 5.0.45. (2007-10-21)
- Ubuntu Linux 6.06 Dapper Drake and MySQL 4.1.15.

Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.

  1. Stop the MySQL Server.
    sudo /etc/init.d/mysql stop

  2. Start the mysqld configuration.
    sudo mysqld --skip-grant-tables &

  3. Login to MySQL as root.
    mysql -u root mysql

  4. Replace YOURNEWPASSWORD with your new password!
    UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
Note: This method is not regarded as the securest way of resetting the password. However it works.


References

MySQL 5.0 Reference Manual: How to Reset the Root Password

How to reset your password in Ubuntu


There are many reasons you might want to reset a password:
Someone gave you a computer with Ubuntu installed on it but not the password for the user account.
You just installed Ubuntu and forgot what password you selected during the installation process.
You have too many passwords in your life and can't keep track of them all.
Well, this tutorial will help you reset your Ubuntu user account password, regardless of what reason you have for resetting it.
First, you have to reboot into recovery mode.
If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.
If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.

From the boot menu, select recovery mode, which is usually the second boot option.

After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

In recent versions of Ubuntu, the filesystem is mounted as read-only, so you need to enter the follow command to get it to remount as read-write, which will allow you to make changes:

mount -o rw,remount /

If you have forgotten your username as well, type

ls /home
That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset Susan Brownmiller's password.
To reset the password, type

passwd username
where username is the username you want to reset. In this case, I want to reset Susan's password, so I type
passwd susan
You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

Now the password should be reset. Type

exit
to return to the recovery menu.
 
After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

Note:
Some people get freaked out about having recovery mode logging you in as root.

INSTALL OpenSSL DAN MEMBUAT SSLCertificate UNTUK MENGAKTIFKAN HTTPS DI APACHE2

Selasa, 07 Agustus 2012

Berikut tutorial dari Bang Opick Opensource Telkomspeedy :

Silahkan Di unduh di link berikut :  Tutorial openssl dan sslcertificate untuk https

Uninstall Apache dengan tuntas....

Terkadang kita membuat konfigurasi web server jadi komplek dan rumit, atau tidak sengaja tiba-tiba membuat setting yang mengakibatkan apache tidak berjalan normal. Untuk mengembalikan apache ikuti langkah uninstall dan install berikut ini.
Jalankan perintah :
        sudo apt-get --purge remove apache2.2-common

Perintah ini akan menghilangkan beberapa paket yang berhubungan :
apache2* apache2-mpm-prefork* apache2.2-common* libapache2-mod-php5* php5*

Dan Install lagi apache yang baru agar kembali ke setting awal :
         sudo apt-get install apache2 apache2-mpm-prefork apache2.2-common libapache2-mod-php5 php5

Web server bisa berjalan normal lagi.

TIPS & TRIK : Webmin Tidak Mendeteksi isc-dhcp-server

Jumat, 04 Mei 2012


Di ubuntu 12.04, webmin tidak mendeteksi adanya isc-dhcp-server. Untuk memperbaiki masalah ini, replace file  /etc/webmin/dhcpd/config dengan isi file sebagai berikut :



start_cmd=/etc/init.d/isc-dhcp-server start
lease_file=/var/lib/dhcp/dhcpd.leases
dhcpd_path=/usr/sbin/dhcpd
display_max=100
group_name=0
lease_tz=0
lease_sort=0
interfaces_type=debian
show_mac=0
stop_cmd=/etc/init.d/isc-dhcp-server stop
dhcpd_conf=/etc/dhcp/dhcpd.conf
pid_file=/var/run/dhcpd.pid
restart_cmd=/etc/init.d/isc-dhcp-server restart
desc_name=0
show_ip=0
dhcpd_nocols=5
add_file=
hostnet_list=
version=
dhcpd_version=4.1.1
dhcpd_size=700320
dhcpd_mtime=1279996769


Setelah isi file /etc/webmin/dhcpd/config Anda edit, refresh modul webmin, dan muncullah DHCP di modul Server.

source : klik

Setting ISC DHCP Server Ubuntu

Kamis, 01 Maret 2012


Rubah File /etc/default/isc-dhcp-server seperti kira-kira dibawah ini :
_______________________________________________
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
# This is a POSIX shell fragment
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0"
________________________________________________

Kemudian File di /etc/dhcp/dhcpd.conf sebagai berikut :
________________________________________________

#
# Sample configuration file for ISC dhcpd for Debian
#
ddns-update-style none;
log-facility local7;
# A slightly different configuration for an internal subnet.
subnet 192.168.100.0 netmask 255.255.255.0 {
  range 192.168.100.251 192.168.100.254;
  option domain-name-servers 192.168.100.6;
  option domain-name "sman1tumpang.sch.id";
  option routers 192.168.100.6;
  option broadcast-address 192.168.100.6;
  default-lease-time 600;
  max-lease-time 7200;
}
______________________________________________

Jalankan service daemonnya :
_________________________________

sudo /etc/init.d/isc-dhcp-server restart
_________________________________

Check dengan client Automatically DHCP......

WEBMIN : Installing on Debian

Sabtu, 11 Februari 2012


If you are using the DEB version of webmin, first download the file from the downloads page, or run the command :wget http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.debthen run the command :dpkg --install webmin_1.580_all.debThe install will be done automatically to /usr/share/webmin, the administration username set to root and the password to your current root password. You should now be able to login to Webmin at the URL http://localhost:10000/. Or if accessing it remotely, replace localhostwith your system's IP address.
If Debian complains about missing dependencies, you can install them with the command :apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions pythonIf you are installing on Ubuntu and the apt-get command reports that some of the packages cannot be found, edit /etc/apt/sources.list and make sure the lines ending with universe are not commented out.
Some Debian-based distributions (Ubuntu in particular) don't allow logins by the root user by default. However, the user created at system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo capability to login with full root privileges.
If you want to connect from a remote server and your system has a firewall installed, see this page for instructions on how to open up port 10000.

Using the Webmin APT repository

If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system and add the lines :deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
You should also fetch and install my GPG key with which the repository is signed, with the commands :cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
You will now be able to install with the commands :apt-get update
apt-get install webmin
All dependencies should be resolved automatically.

Supported Debian-based Distributions

Webmin has been tested on all regular Debian releases, Ubuntu Linux, and derivatives like Xandros and APLINUX.

Source Packages

The files needed to build the Debian package are deb/webmin_1.580.dsc,deb/webmin_1.580.diff, and webmin-1.580.tar.gz .

Install webmin di ubuntu server

Kamis, 09 Februari 2012


Langsung aja gan pertama install paket berikut ini jika paket yang di butuhkan untuk menginstall web mint belum ke install
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
kemudian ada dua cara untuk menginstall webmint yang pertama download paket .deb yang bisa di download di seperti berikut ini
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.570_all.deb
Kemudian lakukan perintah berikut ini untuk menginstall paket .deb tersebut dan jangan lupa paket yang du butuhkan sudah ke install:
dpkg --install webmin_1.570_all.deb
Kemudian cara kedua melalui repo sitory webmin sendiri cara nya seperti berikut ini.
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Tambahkan repo di atas si /etc/apt/sources.list Kemudian jangan lupa untuk key repo itu sendiri caranya seperti berikut
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
Kemudian lakukan perintah update dan install
sudo apt-get update
sudo apt-get install webmin
Sekian.

Administrasi di ubuntu Server 11.04

Selasa, 05 Juli 2011

Installation

At a terminal prompt, enter the following command to install dhcpd:
sudo apt-get install dhcp3-server



HTTPS Configuration

The mod_ssl module adds an important feature to the Apache2 server - the ability to encrypt communications. Thus, when your browser is communicating using SSL, the https:// prefix is used at the beginning of the Uniform Resource Locator (URL) in the browser navigation bar.
The mod_ssl module is available in apache2-common package. Execute the following command from a terminal prompt to enable the mod_ssl module:

sudo a2enmod ssl

There is a default HTTPS configuration file in /etc/apache2/sites-available/default-ssl. In order for Apache2 to provide HTTPS, a certificate and key file are also needed. The default HTTPS configuration will use a certificate and key generated by the ssl-cert package. They are good for testing, but the auto-generated certificate and key should be replaced by a certificate specific to the site or server. For information on generating a key and obtaining a certificate see the section called “Certificates”
To configure Apache2 for HTTPS, enter the following:

sudo a2ensite default-ssl

[Note]
The directories /etc/ssl/certs and /etc/ssl/private are the default locations. If you install the certificate and key in another directory make sure to change SSLCertificateFile andSSLCertificateKeyFile appropriately.
With Apache2 now configured for HTTPS, restart the service to enable the new settings:

sudo /etc/init.d/apache2 restart

[Note]
Depending on how you obtained your certificate you may need to enter a passphrase when Apache2starts.
You can access the secure server pages by typing https://your_hostname/url/ in your browser address bar.





download your webhtb

cd /var/www/
wget http://www.webhtb.ro/downloads/WebHTB_V2.9.bz2

Step 7: extract your webhtb, setup directory location and make startup for webhtb

-extracting
still on /var/www
tar -jxvf WebHTB_V2.9.bz2
-directory locating
cd /var/www/webhtb/docs/
pico webhtb
search this line dir="/var/www/html/webhtb" and change into dir="/var/www/webhtb"
-startup for webhtb
cp -r /var/www/webhtb/docs/webhtb /etc/init.d/
cd /etc/init.d/
chkconfig /etc/init.d/webhtb on

Manajemen Bandwidth dengan WebHTB (III)

Sabtu, 11 Juni 2011


Konfigurasi WebHTB

Instalasi sudah selesai dilakukan dan sekarang saatnya untuk melakukan konfigurasi pada webhtb untuk pembatasan bandwidth pada klien atau host di dalam jaringan kantor Anda. Di bawah ini adalah beberapa studi kasus yang dapat Anda gunakan untuk konfigurasi webhtb.

Membagi Bandwidth Administrator

Sebelum membagi bandwidth untuk klien, Anda harus membagi bandwidth untuk komputer administrator jaringan. Pastinya, bandwidth yang digunakan lebih besar dibandingkan bandwidth klien.
  • Buka browser Anda, dan ketikkan alamat https://192.168.0.50/webhtb, dan masukkan password user root pada kolom password.
  • Pilih interface yang akan digunakan, dengan cara klik tab interface pada panel atas | pilih add interface. Disini dipilih eth1 karena eth1 merupakan interface yang mengarah ke jaringan lokal. Pilih Click to Add.
  • Buat class dengan melakukan klik menu tab Classes | Add Classes
  • Di jendela add classes isikan nama: Administrator, bandwidth:1024, limit: 1024, burst: 0, priority: 1, Que: SFQ. Klik tanda centang untuk simpan.

Manajemen Bandwidth dengan WebHTB (II)


Instalasi SQUID dan Konfigurasi Host

Intalasi Squid

Jika pada artikel sebelumnya kita telah menjalankan proses instalasi webhtb, kini saatnya kita belajar menginstalasi Squid. Apa itu Squid? Squid disini berfungsi sebagai proxy yang akan digunakan dengan webhtb. Squid akan diset menjadi transparant proxy supaya Anda tidak perlu melakukan setting-an pada browser klien Anda.
  • Proses instalasinya adalah:
    # apt-get install squid squid-common squid-cgi
  • Biarkan proses instalasinya selesai, kemudian langkah selanjutnya, Anda matikan terlebih dahulu squid daemon yang sedang berjalan:
    # /etc/init.d/squid stop
  • Lakukan konfigurasi terhadap squid supaya menjadi transparant proxy, dan tambahkan baris berikut di bawah baris http_access deny CONNECT !SSL_ports:
    snmp_port 3401

    acl snmpsquid snmp_community public

    snmp_access allow snmpsquid localhost

    snmp_access deny. all
  • Di bawah baris acl tersebut, tambahkan baris untuk mendeteksi jaringan lokal Anda. Tambahkan baris berikut:
    acl lokalnet src 192.168.0.0/24
    ## sesuaikan dengan nomor jaringan Anda


    http_access allow lokalnet


    http_access deny all


    http_reply_access allow all


    icp_access deny all


    always_direct deny all
  • Kemudian pada baris paling bawah squid.conf, tambahkan baris berikut:
    # vim /etc/squid/squid.com

    tambahkan baris berikut:
    #Marking ZPH

    zph_mode tos

    zph_local 0x04

    zph_parent 0

    zph_option 136


    Baris diatas merupakan implementasi ZPH atau Zero Penalty Hit, kemudian lakukan restart squid daemon sekali lagi:
    # /etc/init.d/squid restart

    Konfigurasi iptables diperlukan supaya transparant proxy langsung dapat berjalan dan diakses pada klien Anda. Buka file rc.local untuk meletakkan iptables:
    # vim /etc/rc.local

    Tambahkan baris di bawah ini, sebelum baris exit 0:
    iptables -A OUTPUT -t mangle -m tos -- tos 0x04 -j MARK - - set-mark 0x04

    iptables -t nat -A POSTROUTING -o etho - j MASQUERADE

    iptables -A PREROUTING -t nat -p tcp -- dport 80 - j REDIRECT -- to- port 3128


    Sesudah menambahkan baris tersebut, restart atau reboot komputer Anda dengan perintah:
    # init 6

    Setelah komputer Anda hidup, pastikan squid daemon sudah berjalan. Cek dengan perintah:
    # ps aux | grep squid

Konfigurasi Host

Setelah proxy sudah siap, lakukan konfigurasi pada klien supaya akses internet klien semuanya melalui proxy server. Seperti yang telah disebutkan sebelumnya, alamat ip address proxy server adalah 192.168.0.50, dan dns yang digunakan adalah 202.169.54.157.
  • Konfigurasi alamat ip host harus masuk dalam satu nomor jaringan, dengan alamat ip proxy server, yaitu 192.168.0.0/24
  • Alamat ip gateway diarahkan ke alamat ip proxy server, yaitu 192.168.0.50
  • Alamat ip dns server menggunakan alamat dns yang sama dengan server yaitu 202.169.54.157 Dengan konfigurasi diatas maka klien atau host sudah melewati proxy server untuk terkoneksi dengan jaringan. Anda dapat mengecek dengan melakukan browsing dari klien.
Oleh: Zaky Abdurrachman/InfoLinux