Latests posts

File and directory permissions

The best way to understand the Linux permissions, is with an example. If we run the command ls -l we get an output like this:

1 2          3     4     5      6     7             8
- rw-r-----  1     user  users     8  ene 24 11:01  f.txt
d rwxr-xr-x  2     root  root   4096  ene 24 12:14  dir

which maps to

Load a kernel module

In Linux, to load a kernel module (for example, fuse) run:

modprobe fuse

You can verify that the module is loaded using the following command:

Give sudo access to any user

Normally, after install the OS (Debian in my case), you don't have sudo access, and you can see this error:

user is not in the sudoers file. This incident will be reported.

OpenSSH, remote host identification has changed

Sometimes when I run the ssh command I get this error:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:7
RSA host key for 192.168.1.5 has changed and you have requested strict checking.
Host key verification failed.