Friday 13 June 2014

How to Install vsftpd on Ubuntu and Add New User



Warning: FTP is inherently insecure. If you must use FTP, consider securing your FTP connection with SSL/TLS. Otherwise, it is best to use SFTP, a secure alternative to FTP.

The first two letters of vsftpd stand for "very secure" and the program was built to have strongest protection against possible FTP vulnerabilities.

Step One—Install vsftpd
You can quickly install vsftpd on your virtual private server in the command line:

sudo apt-get install vsftpd

Once the file finishes downloading, the VSFTP will be on your droplet. Generally speaking, it is already configured with a reasonable amount of security. However, it does provide access on your VPS to anonymous users.

Step Two—Configure vsftpd
Once vsftpd is installed, you can adjust the configuration.

Open up the configuration file:

sudo nano /etc/vsftpd.conf

The biggest change you need to make is to switch the Anonymous_enable from YES to NO:

anonymous_enable=NO

Prior to this change, vsftpd allowed anonymous, unidentified users to access the server's files. This is useful if you are seeking to distribute information widely, but may be considered a serious security issue in most other cases.

After that, uncomment the local_enable option, changing it to yes and, additionally, allow the user to write to the directory.

local_enable=YES
write_enable=YES

Finish up by uncommenting command to chroot_local_user. When this line is set to Yes, all the local users will be jailed within their chroot and will be denied access to any other part of the server.

chroot_local_user=YES
Save and Exit that file.

Because of a recent vsftpd upgrade, vsftpd is "refusing to run with writable root inside chroot". A handy way to address this issue to is to take the following steps:

Create a new directory within the user's home directory
mkdir /home/username/files
Change the ownership of that file to root
chown root:root /home/username

Make all necessary changes within the "files" subdirectory
Then, as always, restart:

sudo service vsftpd restart
Step Three—Access the FTP server
Once you have installed the FTP server and configured it to your liking, you can now access it.

You can reach an FTP server in the browser by typing the domain name into the address bar and logging in with the appropriate ID. Keep in mind, you will only be able to access the user's home directory.

ftp://example.com
Alternatively, you can reach the FTP server on your virtual server through the command line by typing:

ftp example.com

Then you can use the word, "exit," to get out of the FTP shell.



Adding New Users To vsftpd

I found it rather strange that there arent any good tutorial that can explain how to add new users to vftpd. Google gives few results but most of them are trial and error method. So i decided to write this post after spending 1 hr trying to accomplish this simple task.

#edit /etc/vsftpd.conf or /opt/etc/vsftpd.conf
Open the vsftpd.conf file and search for chroot_list_enable=YES
Make sure it is YES. Do the same for the following variables
chroot_list_file=/etc/vsftpd.chroot_list or /opt/etc/vsftpd.chroot_list
chroot_list_enable=YES
Save and close the file

Create vsftpd.chroot_list in /etc/ or /opt/etc/
Add the username you want to export to ftp.
IMP: The user must already be a system user with a valid passwd. You must be able to find /home/
If the user you want to add is not a system user then create that user first before editing the above file.
#adduser 
#passwd 

Restart the vsftpd server using /etc/init.d/vsftpd restart or service vsftpd restart
Now you can log into ftp using the new user.



Tuesday 22 April 2014

Read Media .vob Files on Ubuntu

Finally I figured out how to do it. These are the steps:
  • Create a subdirectory called VIDEO_TS and move all files there.
  • Create an DVD ISO file by executing:
genisoimage -iso-level 1 -dvd-video -volset-size 1 -o output.iso root_folder
  • Mount the DVD ISO by executing:
sudo mount -t iso9660 -o loop output.iso /media/cd/
The result will be a compatible ISO image which can be played using any video player (Totem, MPlayer, Dragon, etc.).
For those ones who are too ubuntufied, you can use K3B to create a DVD project and select "Create image only" before burn it.
Anyway, thanks for the answers. This site is too different from what I was used to in StackOverflow though, I have to say. It seems that some of you just read the title of the questions before answering. Maybe my English is too bad :)

Friday 21 March 2014

How to Change Office 2010 License Key

Issue: You go to activate Microsoft Office 2010 and you receive a message stating, “Your copy of Microsoft Office Professional Plus 2010 cannot be activated because the specified Product Key has already been activated the maximum number of times permitted for your software license as specified in the Microsoft Software License Terms.”




The solution is to change the product key to another product key. I will show you three different methods of changing the License Key
Method 1
Open “regedit”

Navigate the registry to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration\ and delete the whole “Registration” key located under the “14.0″ key
Right click “Registration”
Select “Delete”

Press “Yes”


Close Regedit, Restart an Office 2010 application. You should be prompted to reenter your License Key

Method 2
Open to Microsoft Word
Press “File”
Press “Help”
Select “Change Product Key” (this option was not here on my installation, I used Method 1)


Method 3
Click on Start Menu > Control Panel > Programs and Features (or Add/Remove Programs, depending on your operating system).
Click on your product, e.g. Microsoft Office Professional Plus 2010
Click “Change” on the top menu.



Select the option to “Enter a Product Key.”
Press “Continue”


Changing your Product Key
Once you complete one of the Methods listed above you should be able to change your Product Key
Enter the appropriate product key from the top of this page and click “Continue.”


Accept the agreement
Press “Continue”

Configuration will occur

Press “Close”

Select “I want to activate the software over the Internet (recommended)”
Press “Next”

Your product should activate successfully
Press “Close”



Friday 3 January 2014

How to Install Windows 7 from USB - part 2

2.    Turn the USB Key into a Bootable Device

Insert the Windows 7 install DVD into your drive, and view the files that it contains. Copy all of the files here to a folder on your Desktop. We put the disc contents in a folder named “Windows 7”


Go back to your command prompt, running it as an Administrator. Using the “CD” command, find your way to the folder where you extracted the ISO files. Your command line path should look something like “C:\Users\USERNAMEHERE\Desktop\Windows 7\”.

Type the following commands:

CD Boot (This gets you into the “boot” directory)
Bootsect.exe /nt60 L: (where ‘L’ is the drive letter assigned to your USB key from the previous step)


Bootsect infuses boot manager compatible code into your USB key to make it a bootable device.

IMPORTANT: If you’re currently running 32-bit Windows Vista or 7, Bootsect will only work if you use the files from the 32-bit Windows 7 install disc. The Bootsect executable from the 64-bit version will not run in 32-bit Vista.

3.    Load the USB Key Up with the Install Files

 

Copy all of the extracted ISO files into the USB drive. You don’t need to do this from the command prompt. Just drag and drop the files from the “Windows 7” folder into the drive using Windows Explorer.

Your USB key is now all ready to go! Plug it into your target system and make sure you enter the BIOS (typically with F2 or F12) to temporarily change the boot order to allow booting from the USB key before your primary hard drive or optical drive. On the next restart, your system should automatically begin speedily loading setup files off of the USB key and entering Windows 7 installation.


[Editor's Note: This article was originally posted as "How To: Install Windows 7 Beta from a USB Key!"  It has been updated and reposted for the official launch of Windows 7 on Thursday.]

How to install Windows 7 from a USB - part 1

So after reading our review of Windows 7, you’re ready to take the plunge and upgrade to Microsoft's new OS. You’ve read our upgrade guide, decided whether you want 32- or 64-bit Windows 7, and bought your retail box. But what if you want to install Windows 7 on a netbook or other computer without an optical drive?

Fortunately, you’re not out of luck, because Windows 7 (and Vista, for that matter) can be installed from a USB storage key. Not only does installing from a USB key remove the need for a DVD drive, the install time is also greatly reduced – we shaved off minutes from the total install time. Our step-by-step guide will have you rocking the new version of Windows in no time!


 

Note: This guide will only work within Windows Vista or 7.

Time = 1 hour

What you need:
  • 4GB USB key
    $10, www.newegg.com
  • WinRAR
    Free Evaluation Copy, www.rarlab.com
  • Windows 7
    $99 (OEM)

1.    Format Your USB Key

Plug in your USB key and back up any existing data stored on it. You’ll need to format the key before you can make it a bootable device.


Open up a Command Prompt as an Administrator. You can do this by finding the cmd.exe in yoru Windows/System32 folder, right-clicking the executable, and selecting “Run as Administrator”. Alternatively, type CMD in the Start Menu search field and activate the Command Prompt using Ctrl + Shift + Enter.


You should be under c:\Windows\system32 (assuming your Windows partition is the C drive). Type “diskpart” in the command line to enter the Disk Partition command line tool, which lets you format and create partitions on active disks.

Type “list disk” to reveal a list of all your active disks, each of which is associated with a number. Make a note of which one is your USB key, based on the capacity. In our screenshot below, our USB drive is Disk 6 (8GB).


Next, type the following commands, one at a time:
Select Disk # (Where # is the number of your USB disk. We typed “Select Disk 6”)
Clean (removes any existing partitions from the USB disk, including any hidden sectors)
Create Partition Primary (Creates a new primary partition with default parameters)
Select Partition 1 (Focus on the newly created partition)
Active (Sets the in-focus partition to active, informing the disk firmware that this is a valid system partition)
Format FS=NTFS (Formats the partition with the NTFS file system. This may take several minutes to complete, depending on the size of your USB key.)
Assign (Gives the USB drive a Windows volume and next available drive letter, which you should write down. In our case, drive “L” was assigned.)
Exit (Quits the DiskPart tool)

Mastering Docker Minified Systems: A Step-by-Step Guide with Real Use Cases

Introduction Docker is a powerful platform for developing, shipping, and running applications. Minified Docker systems are optimized for siz...