Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Friday, January 3, 2014

Setting UP VSFTPD on Ubuntu VPS and Machine

9:32 PM Unknown


Setting up VSFTPD [ Very Secure FTP Daemon ] on Ubuntu based VPS and Machine. 





As FTP [ File Transfer Protocol ] used to transfer files is inherently insecure and vulnerable to a number of exploits . So, its preferable to use VSFTPD [ Very Secure FTP Daemon ] as alternative to FTP. It's more secure and have few enhanced features as comparedto FTP.

Setting UP VSFTPD on Ubuntu [ 12.0 ]

  • Open up terminal of machine or Vps and run the following command as root to install vsftpd.
sudo apt-get install vsftpd
  • vsftpd is already configured with default options. So, you can use it as it is and can play with settings to make is more secure.

Making vsftpd more Secure 

  • Open the vsftpd config file and make the following changes.
sudo nano /etc/vsftpd.conf
  • Or you can use 
sudo gedit /etc/vsftpd.conf
    • First, set anonymous mode off to restrict unidentified users from accessing the ftp server.
anonymous_enable=NO
    • Now uncomment local enable and and set it to Yes.
local_enable=YES
write_enable=YES
chroot_local_user=YES
  • Now save and exit from the vsftpd.conf file.
  • Create a separate directory to store ftp files and change the ownership of directory to root.
mkdir /home/username/files  [ To create directory ]
chown root:root /home/username [ To change ownership ]

  • Now Your VSFTPD server is securely setup. Now, restart vsftpd to activate the changes made.
sudo service vsftpd restart

Accessing ftp Server

  • Now, as we have installed and configured our vsftpd server. We , can use it to share files
  • Open your browser and type the address [ ftp://IP of VPS ] eg : [ ftp://192.168.0.1 ]
  • Or to access locally , you can use [ ftp 192.168.0.1 ] to access ftp service.


Thursday, January 2, 2014

Changing Access Privileges of Users to root on Ubuntu Machine / VPS

8:48 PM Unknown

Giving permanent Root Access to Users on Ubuntu Vps or Machine/ Changing Access privileges of user's to root. 



Using non-root account if you are using your machine/vps for limited number of tasks is always a better practice .Sometimes we need to run few commands with root access , although SUDO can be used their ,But as SUDO moniters, and logs the commands run Its better to escalate the privileges of you user account equal to root account.

Giving User account root privileges on Ubuntu VPS or Machine.

sudoers file ubuntu vps
  • The privilege information for each account on Ubuntu machine/vps was stored on a special sudoers file located at /usr/sbin . 
  • The sudoers file can't be directly modified. Hence, we need to use visudo command to edit it.
sudo /usr/sbin/visudo
  • Now scroll to the next line of " # user privilege specification " and add the following line after replacing the user-name with your user-name
user-name ALL =(ALL:ALL) ALL
  • Now press [ Ctrl + X ] and type [ Y ] to save.