пятница, 12 апреля 2019 г.

Сброс настроек OpenWrt

В случае, когда утерян логин и пароль или нет доступа к web-интерфейсу и консоли по другой причине, то можно воспользоваться безопасным режимом, который предусмотрен в прошивке OpenWRT.
  1. Выключите роутер.
  2. Пропишите в настройках Вашей сетевой карты статический IP в диапазоне от 192.168.1.2 и до 192.168.1.254
  3. Подключите кабель к первому LAN порту роутера (В некоторых случаях к WAN порту).
  4. Включите роутер.
  5. Как только начнет мигать ‘SYS’ светодиод (сигнализирующий загрузку системы), нажмите и удерживайте на задней панели кнопку ‘RESET’ (можно использовать также ‘QSS‘ кнопку на передней панели) пока светодиод ‘SYS’ не начнет мигать очень быстро.
  6. После чего, можете открыть telnet консоль по адресу 192.168.1.1. Без запроса логина и пароля.
  7. Из консоли Вы можете смонтировать rootfs_data пространство пользователя для исправления ошибок, для этого необходимо написать в консоли:
    mount_root
  8. Если необходимо сменить пароль наберите в консоли:
    passwd
    и введите новый пароль а затем подтверждение.
Или просто очистить пространство пользователя, используя эту команду:
mtd -r erase rootfs_data
Внимание! Очистка пространства пользователя, равносильна восстановлению прошивки OpenWRT к настройкам по умолчанию, это означает, что Вы потеряете все ранее сохраненные настройки.

среда, 20 сентября 2017 г.

Миграция DHCP сервера с Windows Server 2003 на Server 2016


На Windows Server 2003
 
netsh dhcp server dump > d:\dhcp2003.txt
 
На Windows Server 2016
В случае, если новый сервер будет работать с другим IP-адресом, изменить в файле dhcp2003.txt этот адрес на нужный. Далее выполнить

net stop dhcpserver
удалить все файлы и папки внутри C:\Windows\system32\dhcp
net start dhcpserver
netsh exec d:\dhcp2003.txt
net stop dhcpserver && net start dhcpserver
 
Синхронизируем базы данных DHCP сервера
netsh DHCP server initiate reconcile
 
Команды
netsh dhcp server export import работают только в пределах одной версии ОС

вторник, 5 сентября 2017 г.

Windows 7 / Server 2008 R2 Bare Metal Restore 0x0000007B Stop Error

 

I am tring to restore a Server 2008 R2 Standard Ed (full installation) RTM to a virtual machine, from a full Windows Server Backup image taken of a physical machine.  All restores fine, and looks good until it tries to boot, when a Stop Error occurs, with the following error:

*** STOP: 0x0000007B (0xFFFFF880009A9928, 0xFFFFFFFFC0000034, 0x0000000000000000, 0x0000000000000000)

I believe the non-bracketed portion means "INACCESSABLE_BOOT_DEVICE".

After completing the BMR process don't restart.
Select Command Prompt.
regedt32<CR>
Highlight HKEY_LOCAL_MACHINE, File>Load Hive>[restored volume]:\Windows\System32\Config\SYSTEM>Open>Key Name = Restored_HKLM>OK.
Expand Restored_HKLM\ControlSet001\services and ensure the following are set:
  If restored to a (VMWare) VM then ensure intelide>Start = 0 and LSI_SAS>Start = 0; msahci>Start = 3 and pciide>Start = 3
  NB: I have only tested this with VMWare VMs (Player/Workstation and vSphere) but will likely translate across to Microsoft (e.g. HyperV) VMs. The LSI_SAS value is definitely required, I couldn't boot in a VM until this was chaned to 0.
  Or if restoring to a physical machine with native HDD controller then ensure msahci>Start = 0 and pciide>Start = 0; intelide>Start = 3 and LSI_SAS>Start = 3
Highlight Restored_HKLM and then File>Unload Hive.
Close windows and restart 


Settings for typical destination machines:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
VMWare VM:
aliide 3
amdide 3
atapi 0
cmdide 3
iastorv 3
intelide 0
msahci 3
pciide 3
viaide 3
LSI_SAS 0
Dell PE2970 physical machine with RAID card:
aliide 3
amdide 3
atapi 0
cmdide 3
iastorv 3
intelide 3
msahci 0
pciide 3
viaide 3
LSI_SAS 3
Dell PET100 physical machine on native SATA adapter:
aliide 3
amdide 3
atapi 0
cmdide 3
iastorv 3
intelide 3
msahci 0
pciide 0
viaide 3
LSI_SAS 3
Win 7 64x custom built physical machine on native SATA adapter:
aliide 3
amdide 3
atapi 0
cmdide 3
iastorv 3
intelide 3
msahci 0
pciide 0
viaide 3
LSI_SAS 3

KEY FOR SERVICE START VALUES:
0 = Start
1 = ?
2 = Automatic
 with DelayedAutostart = 1 = Automatic (Delayed Start)
3 = Manual
4 = Disabled

вторник, 22 ноября 2016 г.

Recovering From a SYSTEMced Error

Recovering From a SYSTEMced Error


The Windows 2000 SYSTEMced error occurs when the system can't load the SYSTEM hive of the registry. The reasons include the SYSTEM hive being damaged, missing or too large to load.
The cause I've experienced most often has been the hive being too large to load. The SYSTEM hive has to share 16 MB of memory with several other processes when it is first read so if the hive is 16 MB and the other processes take up 3 MB it just can't be read. Microsoft has instructions for recovering from a hive that gets too large in knowledge base article Q269075. However, I've never been able to recover a system using only the method they specify. Microsoft assumes that the SYSTEM hive is too large because there are a large number of shared resources and their fix is to eliminate the key of the hive with the shares in it. If the SYSTEM hive isn't large due to shares then what makes it too big? As the system reads, writes and deletes data in the registry, it sometimes leaves gaps. While the size of the actual data may not increase by much, the system still has to read in the entire file. If there are 3 MB of data and the registry file has 13 MB of wasted space, there's going to be a problem. Normally the wasted space doesn't get very large, but occasionally a bad program or runaway process makes a mess of the registry.
I recently discovered a program called RegCompact that eliminates the empty wasted space from the registry. Unfortunately it only works on hives that are currently loaded so if you follow Microsoft's instructions and replace the oversized hive with the backup you won't be able to compact it.This procedure requires logging into the recovery console and changing registry hives. If you've come this far chances are your system is already not working right. You could still make things work so take care.
Follow my instructions to repair a SYSTEMced failure that is not due to a large number of shares. These steps are very similar to Microsoft's but we'll assume the problem is not with shares.
  • Use the Windows 2000 CD-ROM or Windows 2000 startup floppies to boot up.
  • Choose R to enter the repair menu.
  • Choose C on the repair menu to run the console.
  • Select the installation of Windows you wish to repair and enter the administrator password.
  • Type cd system32\config and press enter.
  • Rename the bad SYSTEM hive and its alternate by typing ren system system.bad then enter and ren system.alt systemalt.bad then enter.
  • If you have run the Emergency Disk Wizard in the Windows Backup program, type copy C:\WINNT\Repair\Regback\system and press enter. Most if not all of your drivers will already be installed.
  • If you have not run the Emergency Disk Wizard type copy C:\WINNT\Repair\system and press enter. This is the default system hive and you will likely have to install drivers when you reboot.
  • Remove any CDs or floppies and type exit and press enter to reboot.
  • Once Windows boots and you've installed any necessary drivers obtain and install a copy of RegCompact
  • Go to Start -> Run and type regedt32.exe and click OK
  • Locate the window titled HKEY_LOCAL_MACHINE on Local Machine and click on HKEY_LOCAL_MACHINE.
  • On the menu go to Registry -> Load Hive...
  • Navigate to C:\WINNT\system32\config and select system.bad then click Open.
  • For the key name enter System.bad and click OK
  • At this point the bad hive will either load or it won't. - If it doesn't load, it's simply corrupted. You can either use the backup hive you just loaded or start with a fresh install. - If it does load, continue on with the fix.
  • Exit the Registry Editor.
  • Open RegCompact. You should see system.bad in the list of hives. Click Compact. The computer will restart.
  • After the system has booted up into windows again, reboot and use the Windows 2000 CD-ROM or Windows 2000 startup floppies to boot up.
  • Choose R to enter the repair menu.
  • Choose C on the repair menu to run the console.
  • Select the installation of Windows you wish to repair and enter the administrator password.
  • Type cd system32\config and press enter.
  • Rename the temporary SYSTEM hive and its alternate by typing ren system system.bak then enter and ren system.alt systemalt.bak then enter.
  • Copy the formerly bad system file to make it the actual system hive by typing copy system.bad system. There is no need to replace the alternate file because Windows will create a new one.
  • Remove any CDs or floppies and type exit and press enter to reboot.
Your computer should now be running as well as or better than it ran before the SYSTEMced error.

понедельник, 2 ноября 2015 г.

Настройка SSH-доступа для коммутаторов компании HP


Для коммутаторов серии HP ProCurve


Генерация пары ключей для SSH (хранится во flash):
switch(config)# crypto key generate ssh
Включение SSH:
switch(config)# ip ssh 
Просмотр настроек SSH и активных сессий (ssh и telnet сессии можно посмотреть выполнив команду show telnet):
switch(config)# show ip ssh
Отключение Telnet доступа
switch(config)# no telnet-server
Сохранение настроек
switch(config)# write memory
 Просмотр открытого ключа коммутатора:
switch(config)# show crypto host-public-key
Удаление ключа (автоматически отключает SSH):
switch(config)# crypto key zeroize ssh
 
 

Для коммутаторов серии HP 4200

 
<4200G>system-view
rsa local-key-pair create
1024
user-interface vty 0 4
authentication-mode scheme
protocol inbound ssh
local-user networkadmin
password simple MySSHpassword
service-type ssh
quit
ssh user networkadmin authentication-type password
save

NOTE: if you still have web access enabled for the switch, 
this newly configured username and password will be able 
to access the web interface!
 

понедельник, 24 ноября 2014 г.

Настройка папки Общие отправленные для нескольких компьютеров в локальной сети


1) В настройках учетной записи , в разделе "Копии и папки" ставим галочку "отсылать скрытую копию" и в поле адреса пишем адрес этой же самой учетной записи
2) Далее, в "Локальных папках" или в папке Учетной записи - не важно, лишь бы в профиле была -- создаем отдельную папку (напр. "Общие отправленные").
3) Настраиваем фильтр для учетной записи: "От" содержит адрес нашей уч. записи, "переместить сообщение" в папку "Общие отправленные". Запускаем. Так настраиваем на всех компьютерах.
В результате: скрытая копия с письма, отправленного с любого компьютера, приходит на наш же адрес во Входящие и фильтруется в папку "Общие отправленные".

пятница, 23 мая 2014 г.

Некорректная работа Word 2003SP3 с пакетом совместимости Office 2007


При попытке сохранения в формате docx или docm файл сохраняется, но при открытии возникает ошибка. Удалось выяснить, что при сохранении в этих форматах на самом деле по ошибке вызывается конвертор для WORKS 6.0/7.0


Для решения проблемы нужно стереть параметр реестра

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Components\58CE92CC2CB71D119A12000A9CE1A22A]
"wks632"
копия которого находится в
[HKEY_CLASSES_ROOT\Installer\Components\58CE92CC2CB71D119A12000A9CE1A22A]
"wks632"