āļ§ัāļ™āļžāļĪāļŦัāļŠāļšāļ”ีāļ—ี่ 30 āļĄีāļ™āļēāļ„āļĄ āļž.āļĻ. 2560

āļāļēāļĢāļ‚āļĒāļēāļĒāļžื้āļ™āļ—ี่āļŪāļēāļĢ์āļ”āļ”ิāļŠāļ์ Server Ubuntu āđƒāļ™ VM Esxi

āđƒāļ™āļāļēāļĢāļ‚āļĒāļēāļĒāļžื้āļ™āļ—ี่āđƒāļ™ VMware Esxi  āļŠāļēāļĄāļēāļĢāļ–āļ—āļģāđ„āļ”้ 2 āđāļšāļš āļ„ืāļ­āļāļēāļĢ Add Harddisk āđ€āļžิ่āļĄāđ€āļ‚้āļēāđ„āļ›āļ­ีāļ 1 āļ•ัāļ§ āđāļĨāļ°āļ­ีāļāļ§ิāļ˜ีāļ™ึāļ‡āļ„ืāļ­āļāļēāļĢāļ‚āļĒāļēāļĒāļˆāļēāļāđ€āļ™ื้āļ­āļ—ี่āđ€āļ”ิāļĄāļ—ี่āļĄีāļ­āļĒู่āđƒāļŦ้āļĄāļēāļāļ‚ึ้āļ™ āļ‹ึ่āļ‡āđƒāļ™āđāļšāļšāļ—ี่āļˆāļ°āļ—āļģāļ„ืāļ­āļāļēāļĢāļ‚āļĒāļēāļĒāļžื้āļ™āļ—ี่āđ€āļ”ิāļĄ āđ€āļŠ่āļ™āļˆāļēāļ 30 GB āđ€āļ›็āļ™ 80 GB  āđƒāļ™āļ•ัāļ§āļ­āļĒ่āļēāļ‡āļˆāļ°āļŠāļēāļ˜ิāļ•āļāļēāļĢāļ‚āļĒāļēāļĒāđ€āļ™ื้āļ­āļ—ี่āļˆāļēāļ 5.70 GB āđ€āļ›็āļ™ 8.69 GB

xpanding a Linux disk with gparted (and getting swap out of the way)

Over the past year or so there have been a few times where I've need to expand a disk attached to a Debian system.  Now this isn't a hard task by any means, and may not even warrant a blog post, but the matter of it is that I always seem to forget the steps I need to take to get that unallocated space that I've added next to my actual EXT3 partition since the swap partition is always in the way!  So, I thought I would just throw up how I've done it in the past in hopes to maybe help a few others that visit, but more-so for myself and my memory (or lack there of).  Now keep in mind I'm sure there are ways to perform this exact same thing without taking the VM online, or I'm sure there are other 'better' ways to achieve the same results, but this way has worked for me consistently so it's what I chose to do.  Any other suggestions are certainly welcome in the comment box below.
First off, you will need to expand your drive from within the vSphere Client, not rocket science here, pretty simple to do.  Next, get yourself a copy of gparted and mount the ISO to your VM and reboot booting into the gparted interface (accept all defaults for keymap, X, and resolutions, unless of course you like playing…).  So the first thing you will notice inside gparted is that the swap partition is right smack in the middle of your EXT3 partition and the unallocated space. Normally, you could just resize the EXT3 partition and consume the unallocated space, but with swap there you can't.

So, the goal is to migrate the unallocated space to precede the swap partition.  This is done so using the following procedure..
First, resize your extended partition (not the one labeled linux-swap) to include the free space.  In my case this is done by selecting /dev/sda2 and then selecting the Resize/Move button.  In the popup, simply drag the arrow on the right side of the bar to include all of the free space available and again select Resize/Move.

   

Just to note, we are not actually performing and moves or resizes at this point, we are simply just creating a chain of commands that gparted will follow once it is applied.  You can either apply at the end of each step, or wait till the bitter end and do it, its up to you.  Either way when you are done, you should see your unallocated space move into /dev/sda2 as shown below.

So, as you can see from the screen capture, the next thing we need to do is move that swap partition to the end of /dev/sda2.  This will allow us to proceed with the next few steps that we need to perform in order to accomplish our end goal of expanding /dev/sda1.  This time we will need to select the linux-swap partition (/dev/sda5) and select Resize/Move.  Inside the popup, this time click the actual white space inside the partition and drag the complete box over to the right (don't use the arrows).  This will move the swap partition to the end of /dev/sda2 for us which we will next resize.  Once your looking like the below images, again, click 'Resize/Move'.
 

Alright, now we are getting somewhere, you should be looking pretty similar to the shot below by now.  And yes you guessed it, now we need to move that unallocated space right outside of /dev/sda2 in order to make it available for the expansion of /dev/sda1.

So, once again select /dev/sda2 and select 'Resize/Move'.  This time we will use the arrows.  What we want is to move the left arrow this time to the right all the way over to edge of the yellow box (swap).  This will resize the complete /dev/sda2 to the same size as the swap it contains (/dev/sda5) and in turn, create that unallocated space in between the partitions.  Once done, click 'Resize/Move'.
  



Alright, almost there, you should be somewhat similar to the screenshot below.  Our unallocated space is now directly next to our EXT3 partition and no long a member of /dev/sda2.


At this point I usually apply the first three operations before the expansion.  I've noticed sometimes the process will error out if trying to do the following steps without applying first, so go ahead and apply those operations (Hit 'Apply')
So we are now able to simply extend /dev/sda1 into that unallocated space.  Similar to when we extended /dev/sda2, this time select /dev/sda1, click 'Resize/Move'.  In the popup as we did earlier, select the arrow at the right side of the partition, and drag it to the right to merge sda1 with the unallocated space, when done, select 'Resize/Move'.
  

So, there you have it!  We have moved that unallocated space into our EXT3 partition.  Go ahead and hit apply again to commit that final change and at the end of the process you should have a larger /dev/sda1.

Now, like I said at the beginning, I'm sure there are ways to do this while the VM is online, or I could be doing things completely wrong, but this way has consistently worked for me for both Linux and Windows guests.  That being said, I'm open to other suggestions, leave them your comments, concerns, thoughts, etc below in the comments … ðŸ™‚

Web Reference : http://blog.mwpreston.net/2012/06/22/expanding-a-linux-disk-with-gparted-and-getting-swap-out-of-the-way/

āļ§ัāļ™āļžāļĪāļŦัāļŠāļšāļ”ีāļ—ี่ 16 āļุāļĄāļ āļēāļžัāļ™āļ˜์ āļž.āļĻ. 2560

āļ§ิāļ˜ีāļāļēāļĢ Reset password in Ubuntu

1. āļ—ี่āļŦāļ™้āļē GNU Grub āđ€āļĨืāļ­āļ Advanced Option for Ubuntu
2. āđ€āļĨืāļ­āļ Ubuntu, with Linux (recovery mode)
3.āļ—ี่āļŦāļ™้āļē Recovery Menu āđ€āļĨืāļ­āļ root āļāļ” Ok āļˆāļ°āļ‚ึ้āļ™ command line
4.āļžิāļĄāļž์
#mount -o rw,remount /
#ls /home --> āļ”ู user āļ—ี่āļ•้āļ­āļ‡āļāļēāļĢ reset password
5.āļžิāļĄāļž์  #passwd <username>
6.Enter new Unix password : āđƒāļŠ่āļĢāļŦัāļŠāļœ่āļēāļ™āđƒāļŦāļĄ่āļ—ี่āļ•้āļ­āļ‡āļāļēāļĢ



7. āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§āļāļ” Exit
8.āđ€āļĨืāļ­āļ resume āđ€āļ‚้āļēāļŦāļ™้āļē reboot āļ›āļāļ•ิ


āļ§ัāļ™āļˆัāļ™āļ—āļĢ์āļ—ี่ 23 āļĄāļāļĢāļēāļ„āļĄ āļž.āļĻ. 2560

āļāļēāļĢāđ€āļ›ิāļ” Direct Console User Interface (DCUI) āļ”้āļ§āļĒ SSH - ESXi



āļāļēāļĢāđ€āļ›ิāļ” Direc Console User Interface (DCUI) āļ”้āļ§āļĒ SSH
1. āđ€āļĨืāļ­āļ Host āļ—ี่āļ•้āļ­āļ‡āļāļēāļĢ āđ€āļ‚้āļēāļ—ี่āļŦัāļ§āļ‚้āļ­ Configuration
2. āļ—ี่āļŦัāļ§āļ‚้āļ­ Software āđ€āļĨืāļ­āļ Security Profile āđ€āļĨืāļ­āļ Properties
3. āđ€āļ›ิāļ”āđƒāļŠ้āļ‡āļēāļ™ SSH , ESXShell , Direct Console UI
 



4. āļˆāļēāļāļ™ั้āļ™āđ€āļ‚้āļēāļŦัāļ§āđ‚āļ›āļĢāđāļāļĢāļĄ Putty āđāļĨāļ° Login āđ€āļ‚้āļē Host āļ—ีāļ•้āļ­āļ‡āļāļēāļĢ
5. āļžิāļĄāļž์ dcui
6. āļˆāļ°āļ‚ึ้āļ™āļŦāļ™้āļē DCUI āđ€āļŦāļĄืāļ­āļ™āļ­āļĒู่āļŦāļ™้āļē Server āđ‚āļ”āļĒāļ•āļĢāļ‡


āļŦāļĨัāļ‡āļˆāļēāļāđƒāļŠ้āļ‡āļēāļ™āđ€āļŠāļĢ็āļˆ āđƒāļŦ้āđ€āļ‚้āļēāđ„āļ›āļĒāļāđ€āļĨิāļāļāļēāļĢāđ€āļ›ิāļ”āđƒāļŠ้āļ‡āļēāļ™ SSH , ESXShell , Direct Console UI āļ”้āļ§āļĒāđ€āļžื่āļ­āļ„āļ§āļēāļĄāļ›āļĨāļ­āļ”āļ ัāļĒ

āļ§ัāļ™āļ­ัāļ‡āļ„āļēāļĢāļ—ี่ 13 āļ˜ัāļ™āļ§āļēāļ„āļĄ āļž.āļĻ. 2559

āļ§ิāļ˜ีāļ›ิāļ” Encryption āđƒāļ™ Ubuntu āļŠāļģāļŦāļĢัāļš Remote VNC

āđƒāļŠ้āļัāļš Ubuntu āđ€āļ§āļ­āļĢ์āļŠั้āļ™ 14 āļ‚ึ้āļ™āđ„āļ›

1. āļ•ิāļ”āļ•ั้āļ‡ dconf-editor
#sudo apt-get install dconf-editor

2. āļ•ิāļ”āļ•ั้āļ‡āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§āđƒāļŦ้āđ€āļĢีāļĒāļāđ‚āļ›āļĢāđāļāļĢāļĄ dconf-editor

3. āđ€āļ‚้āļēāđ„āļ›āļ—ี่ org  >>  gnome >> desktop >> remote-access and Disable "require encryption"

4. āļŦāļĨัāļ‡āļˆāļēāļāļĒāļāđ€āļĨิāļāļāļēāļĢ encryption āđāļĨ้āļ§ āļĨāļ­āļ‡āđƒāļŠ้ vnc āđƒāļ™āļāļēāļĢ remote āđ€āļ‚้āļē server āļ­ีāļāļ„āļĢั้āļ‡

5. āļˆāļēāļāļ™ั้āļ™āđ€āļ‚้āļēāđ„āļ›āļ—ี่ Desktop sharing āđāļĨ้āļ§āđ„āļ›āļ•ั้āļ‡āļ„่āļē Allow āđāļĨāļ° Security

āļ§ัāļ™āļĻุāļāļĢ์āļ—ี่ 25 āļžāļĪāļĻāļˆิāļāļēāļĒāļ™ āļž.āļĻ. 2559

āļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡āđ‚āļ›āļĢāđāļāļĢāļĄāļŠāļģāļŦāļĢัāļšāļ•āļĢāļ§āļˆāļŠāļ­āļšāļŠ่āļ­āļ‡āđ‚āļŦāļ§่ Nessus āļœ่āļēāļ™ Ubuntu

āđ‚āļ›āļĢāđāļāļĢāļĄ Nessus āđ€āļ›็āļ™āđ‚āļ›āļĢāđāļāļĢāļĄāļ—ี่āđƒāļŠ้āđƒāļ™āļāļēāļĢāļ•āļĢāļ§āļˆāļŠāļ­āļšāļŠ่āļ­āļ‡āđ‚āļŦāļ§่āļ‚āļ­āļ‡āļ­ุāļ›āļāļĢāļ“์āđ€āļ„āļĢืāļ­āļ‚่āļēāļĒ āđ‚āļ”āļĒāļŠāļēāļĄāļēāļĢāļ–āđāļŠāļ”āļ‡āļĢāļēāļĒāļĨāļ°āđ€āļ­ีāļĒāļ”āļ‚āļ­āļ‡āļŠ่āļ­āļ‡āđ‚āļŦāļ§่āļ‚āļ­āļ‡āđāļ•่āļĨāļ°āđ€āļ„āļĢื่āļ­āļ‡āđāļĄ่āļ‚่āļēāļĒāđ„āļ”้ āļˆึāļ‡āđ€āļŦāļĄāļēāļ°āļัāļšāļœู้āļ”ูāđāļĨāļĢāļ°āļšāļšāđ€āļžื่āļ­āđƒāļŠ้āđƒāļ™āļāļēāļĢāļ•āļĢāļ§āļˆāļŠāļ­āļšāđ€āļ„āļĢืāļ­āļ‚่āļēāļĒāļ āļēāļĒāđƒāļ™āļŦāļ™่āļ§āļĒāļ‡āļēāļ™

āļ§ิāļ˜ีāļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡
1. āļ•ิāļ”āļ•ั้āļ‡āļĢāļ°āļšāļšāļ›āļิāļšัāļ•ิāļāļēāļĢ Ubuntu āđƒāļŦ้āđ€āļĢีāļĒāļšāļĢ้āļ­āļĒ
2. āļ”āļēāļ§āļ™์āđ‚āļŦāļĨāļ”āđ„āļŸāļĨ์āļˆāļēāļāđ€āļ§็āļšāļ•่āļ­āđ„āļ›āļ™ี้ http://www.tenable.com/products/nessus/select-your-operating-system āļˆāļ°āđ„āļ”้āđ„āļŸāļĨ์ Nessus-6.9.1-ubuntu1110_amd64.deb
3. āļ๊āļ­āļ›āļ›ี้āđ„āļŸāļĨ์āđ„āļ›āđ„āļ§้āļ—ี่ Ubuntu
4. āļˆāļēāļāļ™ั้āļ™āđƒāļŠ้āļ„āļģāļŠั่āļ‡   sudo dpkg -i Nessus-6.9.1-ubuntu1110_amd64.deb  āđāļĨāļ°āļĢāļ­āļˆāļ™āļ•ิāļ”āļ•ั้āļ‡āđ€āļŠāļĢ็āļˆ
5. āļŦāļĨัāļ‡āļˆāļēāļāļ•ิāļ”āļ•ั้āļ‡āļœ่āļēāļ™ server āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§ āļŠั่āļ‡āđƒāļŦ้ service āļ—āļģāļ‡āļēāļ™ āđ‚āļ”āļĒāđƒāļŠ้āļ„āļģāļŠั่āļ‡āļ”ัāļ‡āļ™ี้
sudo /etc/init.d/nessusd start  āļˆāļēāļāļ™ั้āļ™ āđƒāļŦ้āđ€āļ›ิāļ”āļŦāļ™้āļēāđ€āļ§็āhttps://ipaddress:8834/ āđāļĨāļ°āđ€āļ‚้āļēāđ„āļ›āļ•ิāļ”āļ•ั้āļ‡āļ•āļēāļĄāļĨāļģāļ”ัāļš
6. āļˆāļēāļāļ™ั้āļ™āļ—āļģāļāļēāļĢ Activate Code āđ‚āļ”āļĒāđ€āļ‚้āļēāđ„āļ›āļ—ี่ http://www.tenable.com/products/nessus/nessus-plugins/obtain-an-activation-code āđ€āļĨืāļ­āļ Nessus Home Free āđāļĨ้āļ§āđ€āļĨืāļ­āļ Register
āļĢāļ°āļšāļšāļˆāļ°āđƒāļŦ้āļāļĢāļ­āļāđ€āļĄāļĨ์ āđāļĨ้āļ§āļˆāļ°āļŠ่āļ‡āđ€āļĨāļ‚ Register āđƒāļŦ้
7. āļŦāļĨัāļ‡āļˆāļēāļāļ•ิāļ”āļ•ั้āļ‡āđ€āļŠāļĢ็āļˆāļŦāļĄāļ”āđāļĨ้āļ§ āļāļ”āļ›ุ่āļĄ New Scan āđ€āļžื่āļ­āđƒāļŠ่ IP āļ‚āļ­āļ‡ server āđ€āļžื่āļ­āļ•āļĢāļ§āļˆāļŠāļ­āļšāļŠ่āļ­āļ‡āđ‚āļŦāļ§่

āļ§ัāļ™āļžุāļ˜āļ—ี่ 23 āļžāļĪāļĻāļˆิāļāļēāļĒāļ™ āļž.āļĻ. 2559

āđāļ้āļ›ัāļāļŦāļē Nessus āđāļĨ้āļ§āđ„āļĄ่āļ‚ึ้āļ™āļŦāļ™้āļē Login

āđƒāļ™āļāļĢāļ“ีāļ—ีāļĄีāļāļēāļĢ Clone VM Guest OS āļ‚āļ­āļ‡ Nessus āđ„āļ›āļĒัāļ‡ Host āļ­ื่āļ™ āļŦāļĨัāļ‡āļˆāļēāļāļ™ั้āļ™āđ€āļ›ิāļ”āļ—āļģāļ‡āļēāļ™āđāļĨ้āļ§āđ„āļĄ่āļ‚ึ้āļ™āļŦāļ™้āļēāđƒāļŦ้ Login āđƒāļŦ้āđāļ้āđ„āļ‚āļ”ัāļ‡āļ™ี้



āļ›ิāļ”āļāļēāļĢāļ—āļģāļ‡āļēāļ™āļ‚āļ­āļ‡ Nessus āļ่āļ­āļ™ āļ‹ึ่āļ‡āđƒāļŠ้āļĢāļ°āļšāļšāļ›āļิāļšัāļ•ิāļāļēāļĢ Ubuntu
Debian/Kali and Ubuntu
# /etc/init.d/nessusd start
# /etc/init.d/nessusd stop

āđ€āļ‚้āļēāđ„āļ›āļ—ี่āļžāļēāļ˜āļ”ัāļ‡āļ™ี้   cd /opt/nessus/sbin
āđƒāļŠ้āļ„āļģāļŠั่āļ‡āļ”ัāļ‡āļ™ี้
./nessuscli fetch --register

āļŦāļēāļāđ„āļĄāđ„่āļ”้āļĨāļ­āļ‡āļ„āļģāļŠั่āļ‡āļ™ี้
./nessuscli fix --reset