This page is for all the users that are not used to manage linux environment.


Add/delete a user in your virtual machine

In order to add the user and set his/her password  use following commands

sudo /usr/sbin/adduser <username> 

sudo chage -d 0 <username>

After you need to modify the file /etc/ssh/sshd_config, enabling the PasswordAuthentication and then restart and check the SSH deamon:

Ubuntu: 

sudo systemctl restart sshd.service

sudo systemctl status sshd.service

CentOS:

sudo systemctl restart sshd.service

sudo systemctl status sshd.service


In order to delete a user and his/her HOME directory just execute the command:

deluser --remove-home <username>


Grant a user root privileges in your virtual machine


How to mount remote filesystem with FUSE (Filesystem in USEr space) on CentOS or Ubuntu


On Ubuntu- First you have to install FUSE and SSHFS packages with the apt-get comand:

apt-get install fuse 


apt-get install sshfs


Once the FUSE module is loaded, you can mount your remote partition using SSHFS:


sshfs user@remote_host:/remote_directory  /local_mount_partition


If you have configured the login via ssh key authorization, you can use the following command:


sshfs user@remote_host:/remote_directory  /local_mount_partition -o IdentityFile=<absolute-path-with-key>



Note: If appear the following error 


fuse: bad mount point `/local_mount_partition': Transport endpoint is not connected


execute :  sudo fusermount -u /local_mount_partition


How to use and configure Docker in your virtual machine

To use Docker in your virtual machine please set the MTU value at 1400 in the file  /etc/docker/daemon.json.  More in particular edit the file /etc/docker/daemon.json and then set


For any questions please write to superc@cineca.it .