Terminal
sudo chmod 777 .cache -R
Technical notes
This blog was intended for personal use only. I'm very happy if you manage to find some kind of inspiration, but I am not responsible for any damage you can cause by following my tips.
Windows - Uninstall SOPHOS End Point without the unlock password
Enable the Administrator user (if it's not already enabled).
Reboot your Windows system into Safe Mode.
Login as Administrator
Run services.msc
Search for the Sophos Anti-Virus service and click on it with the right mouse button.
From the context menu, select Properties and then deactivate the service.
Run regedit.
Go to the following location in the registry editor: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos MCS Agent and set REG_DWORD Start value to 0x00000004
Then, go to the following location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Endpoint Defense\TamperProtection\Config set the REG_DWORD values SAVEnabled and SEDEnabled both to 0.
Finally, go to the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Sophos\SAVService\TamperProtection and set the REG_DWORD value to 0.
Reboot the system in normal mode.
Try the uninstall process, it will be need another reboot.
Reboot your Windows system into Safe Mode.
Login as Administrator
Run services.msc
Search for the Sophos Anti-Virus service and click on it with the right mouse button.
From the context menu, select Properties and then deactivate the service.
Run regedit.
Go to the following location in the registry editor: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos MCS Agent and set REG_DWORD Start value to 0x00000004
Then, go to the following location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Endpoint Defense\TamperProtection\Config set the REG_DWORD values SAVEnabled and SEDEnabled both to 0.
Finally, go to the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Sophos\SAVService\TamperProtection and set the REG_DWORD value to 0.
Reboot the system in normal mode.
Try the uninstall process, it will be need another reboot.
Linux Mint 19 - Looping of login screen
Problem:
After the login, the screen gets black, and then you get the login screen again.
My solution:
Press [ctrl][alt][F3] to jump to a terminal
Login with your credentials
Digit ls -lha and take note of permission of .Xautority
Note that the permission is like this:
-rw------- 1 root root 53 Jul 02 20:19 .Xauthority
Digit chown myuser:myuser .Xauthority (where myuser is your user name)
Now the permission is changed like the following:
-rw------- 1 myuser myuser 53 Jul 02 20:19 .Xauthority
Press [ctrl][alt][F7] to jump to the graphical login screen
Try to login.
After the login, the screen gets black, and then you get the login screen again.
My solution:
Press [ctrl][alt][F3] to jump to a terminal
Login with your credentials
Digit ls -lha and take note of permission of .Xautority
Note that the permission is like this:
-rw------- 1 root root 53 Jul 02 20:19 .Xauthority
Digit chown myuser:myuser .Xauthority (where myuser is your user name)
Now the permission is changed like the following:
-rw------- 1 myuser myuser 53 Jul 02 20:19 .Xauthority
Press [ctrl][alt][F7] to jump to the graphical login screen
Try to login.
Synology - Setting a personal VPN with the NAS
Prerequisite: If you do not have a static IP, enable and set the DDNS on the SYNOLOGY NAS.
name VPN
protocol UPD
local IP address [the IP of the NAS, it's better to give him a static internal IP]
local port 1194
(or range 1194-1194)
WAN IP address ANY
WAN port 1194
(or range 1194-1194)
Run OpenVPN GUI as administrator.
Get VPNConfig.ovpn from the zip archive, edit it:
replace YOUR_SERVER_IP with the public IP of NAS or the hostname registered in the DDNS service of your NAS Synology
add those lines:
auth-user-pass auth.txt
route 0.0.0.0 0.0.0.0 vpn_gateway 500
Put it in C:\Program Files\OpenVPN\config
Ever in C:\Program Files\OpenVPN\config create a file named auth.txt
Edit it adding two lines: in the first one the user name created in Synology and in the second one its password.
At log on,
start C:\Program Files\OpenVPN\bin\openvpn-gui.exe
with those parameters --connect VPNConfig.ovpn
SETTING THE SYNOLOGY
- Install the package [VPN Server] in the Synology NAS.
- In my opinion (and for my needs) it's better to create only one VPN user and give the permision to fruition the VPN enviroment only to him. It's better that the password is very complex.
- Run it. In the left, from the group [Set up VPN Server], select [OpenVPN].
- Put a tick in [Enable OpenVPN server].
- Change the range of the Dinamic IP, if needed.
- Take note of the port "1194" and the protocol "UPD": it will be needed for setting the port forwarding in the Firewall.
- Click on [Export configuration] to have a zip archive content the certificate [ca.crt] and the configurations [VPNConfig.ovpn]
SETTING THE FIREWALL
Setting the firewall that's connected to the NAS, creating a rule with this parameter:name VPN
protocol UPD
local IP address [the IP of the NAS, it's better to give him a static internal IP]
local port 1194
(or range 1194-1194)
WAN IP address ANY
WAN port 1194
(or range 1194-1194)
SETTING OPENVPN IN WINDOWS
From here, download OpenVPN and install it on the PC.Run OpenVPN GUI as administrator.
Get VPNConfig.ovpn from the zip archive, edit it:
replace YOUR_SERVER_IP with the public IP of NAS or the hostname registered in the DDNS service of your NAS Synology
add those lines:
auth-user-pass auth.txt
route 0.0.0.0 0.0.0.0 vpn_gateway 500
Put it in C:\Program Files\OpenVPN\config
Ever in C:\Program Files\OpenVPN\config create a file named auth.txt
Edit it adding two lines: in the first one the user name created in Synology and in the second one its password.
CREATE AN AUTOMATIC TASK IN WINDOWS
Create a task in Task Scheduler with these rules:At log on,
start C:\Program Files\OpenVPN\bin\openvpn-gui.exe
with those parameters --connect VPNConfig.ovpn
Linux - share DVD-ROM through the LAN
Prerequisite: Samba has to be installed and I suppose that the hostname of your PC is MyPC.
Create a directory in /media
sudo mkdir /media/DVD
Modify /etc/fstab by adding this line:
/dev/sr0 /media/DVD iso9660 defaults,noauto,ro,user,uid=1000,gid=1000 0 0
(one line)
Add (or check if it is already there) those lines in /etc/samba/smb.conf
[DVD-ROM]
path = /media/DVD
browseable = yes
read only = yes
guest ok = yes
locking = no
preexec = /bin/mount /media/DVD
postexec = /bin/umount /media/DVD
writable = no
Reread /etc/fstab
sudo mount -a
(ignore the errors that appears: it attempts to mount some already mounted devices)
Restart Samba
sudo service smbd restart
Put a DVD/CD into the drive and check the share:
in MAC
Finder > Go > Connect to Server...
type: smb://MyPC and press enter
Select Guest as user name
in Windows
Open the File Explorer
type \\MyPC and press enter
Create a directory in /media
sudo mkdir /media/DVD
Modify /etc/fstab by adding this line:
/dev/sr0 /media/DVD iso9660 defaults,noauto,ro,user,uid=1000,gid=1000 0 0
(one line)
Add (or check if it is already there) those lines in /etc/samba/smb.conf
[DVD-ROM]
path = /media/DVD
browseable = yes
read only = yes
guest ok = yes
locking = no
preexec = /bin/mount /media/DVD
postexec = /bin/umount /media/DVD
writable = no
Reread /etc/fstab
sudo mount -a
(ignore the errors that appears: it attempts to mount some already mounted devices)
Restart Samba
sudo service smbd restart
Put a DVD/CD into the drive and check the share:
in MAC
Finder > Go > Connect to Server...
type: smb://MyPC and press enter
Select Guest as user name
in Windows
Open the File Explorer
type \\MyPC and press enter
Windows - W10 delete Grub settings
Scenario: You have installed W10 beside Linux (Ubuntu or Ubuntu based) but after this job, Grub disappear and you are not longer able to select the S.O. at the boot.
- Start with W10
- Open a DOS prompt with administrator privilege
- execute this command:
- bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
- Restart your computer with a live Ubuntu distribution
- Open a terminal (Ctrl Alt T)
- Regenerate Grub with this command:
- sudo update-grub
Linux - analize space used by installed packages
With this command you can get a list of installed packages, order by size:
- dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'
Subscribe to:
Posts (Atom)