sasha2002 Blog's

Just another blog from admin's

system wide proxy ubuntu linux —

In the end of file /etc/bash.bashrc :
# nano /etc/bash.bashrc
export http_proxy=http://192.168.241.4:63128/
export https_proxy=http://192.168.241.4:63128/
export ftp_proxy=http://192.168.241.4:63128/

In the end of file :
# nano /etc/environment
JAVA_HOME=”/usr/lib/jvm/java-8-oracle”
JRE_HOME=”/usr/lib/jvm/java-8-oracle/jre”
export http_proxy=http://192.168.241.4:63128/
export https_proxy=http://192.168.241.4:63128/
export ftp_proxy=http://192.168.241.4:63128/

In the end of file(if file not exist create one) /etc/apt/apt.conf:
# nano /etc/apt/apt.conf
Acquire::http::Proxy “http://192.168.241.4:63128”;
Acquire::https::Proxy “http://192.168.241.4:63128”;
Acquire::ftp::Proxy “http://192.168.241.4:63128”;


How to extend disk \ partition on Hyper-V —

1. Stop VM and edit disk.
2. Start VM and login.
3. Enter :
cfdisk /dev/hda
or
cfdisk /dev/sda
You should see the space that you just added.
3.1. Now create a new Logical Partition on this free space.
3.2. After that change Type of partition to (Linux LVM ) enter :
8e
3.3. Write changes to disk.
4. Take a look if new /dev/hda? or /dev/sda? appear, if no restart VM.
5. Initialize the new Physical Volume for use with LVM :
pvcreate /dev/hda?
(? is whatever number you created using the CFDISK tool) or
pvcreate /dev/sda?
6. Next run this to see LVM partition names :
lvdisplay
7. Add the new partition to the Volume Group (Name of LVM see before)
vgextend LVM_Name /dev/sda?
8. Resize the entire LVM :
lvresize -l +100%FREE /dev/LVM_Name/root (where /dev/LVM_Name/root is the LV Name of the volume you want to increase)
9. Expanding the Linux File System to make use of the new free space we just added :
resize2fs /dev/LVM_Name/root (where /dev/LVM_Name/root is your LV Name from the previous section)
10. Verify if partition increased :
df -h


fix psexec hang on remote connect —

1. Add this reg key on target:
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

2. Disable firewall (note – this will leave you with out any firewall protection)
netsh advfirewall set allprofiles state off

3. If target user has a blank PW and you don’t want to add one, run on target:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] "LimitBlankPasswordUse"=dword:00000000
Read the rest of this entry »