«Windows terminal server» и «Recover Deleted Files on an NTFS Hard Drive from a Linux»: разница между страницами

Материал из support.qbpro.ru
(Различия между страницами)
imported>Vix
Нет описания правки
 
imported>Vix
(Новая страница: «To undelete our files, we first need to identify the hard drive that we want to undelete from. In the terminal window, type in: sudo fdisk –l and press ente…»)
 
Строка 1: Строка 1:
== Оптимизация Windows terminal server ==
To undelete our files, we first need to identify the hard drive that we want to undelete from. In the terminal window, type in:
'''В данной статье рассматривается возможность оптимизации работы терминального сервера на платформе Windows. Данные рекомендации использовались на версиях Windows XP и Windows 2003. Возможно будут работать на Windows 7.'''
*подразумевается, что вы уже установили сервер терминалов, он у вас работает и все дальнейшие действия выполняются на рабочем сервере. При этом категорически рекомендуем делать bakup изменений реестра или изменяемых системных файлов.


*Рекомендация для правильной работы спулера принтеров сервера, данная операция производится после установки всех необходимых драйверов принтеров.
  sudo fdisk –l
  Сообщения об ошибках из-за проблем с монитором локального порта
После перезагрузки компьютера или после перезапуска службы «Диспетчер очереди печати» появляется следующее сообщение об ошибке:
Сбой при запуске Spoolsv.exe
Если открыть окно свойств принтера, появляется следующее сообщение об ошибке:
Недостаточно ресурсов
При попытке печати документа появляется сообщение об ошибке «Нарушение прав доступа» (программа Dr. Watson). В журнале программы
Dr. Watson присутствует запись об ошибке в программе Spoolsv.exe с кодом ошибки C0000005.
Появляется следующее сообщение об ошибке и диспетчер очереди печати останавливается:
Инструкция по адресу 'адрес' обратилась к памяти по адресу 'адрес'. Память не может быть «read».
Такое же сообщение появляется при попытке перезапуска службы «Диспетчер очереди печати» и при открытии папки «Принтеры».
Причиной проблемы может являться то, что используемый по умолчанию монитор локального порта заменен программой независимого
производителя. Чтобы устранить ошибку, необходимо внести изменения в системный реестр.
*Для этого выполните следующие действия.
Откройте редактор реестра.
2. Найдите параметр Local Port в следующем разделе реестра.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Local Port
3. Дважды щелкните параметр Driver и измените его значение. Введите строковое значение Localspl.dll и нажмите кнопку ОК.
4. Проверьте, присутствуют ли мониторы независимых производителей в следующем разделе реестра. Удалите все мониторы,
кроме используемых по умолчанию.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors
По умолчанию используются следующие мониторы.
AppleTalk Printing Devices (присутствует, если установлены службы для Macintosh)
BJ Language Monitor
Local Port
PJL Language Monitor
Standard TCP/IP Port
USB Monitor
Windows NT Fax Monitor


  ** LPR Port
  and press enter.
Примечание. Удаление монитора LPR Port должно выполняться только по рекомендации специалиста службы технической поддержки
корпорации Майкрософт.
5. Проверьте, присутствуют ли службы печати сторонних производителей в следующем разделе реестра. Удалите все службы печати,
кроме используемых по умолчанию.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Providers
По умолчанию используется следующие службы печати.
Internet Print Provider
LanMan Print Services
6. Проверьте, присутствуют ли обработчики печати сторонних производителей в следующем разделе реестра. Удалите все обработчики
печати, кроме используемых по умолчанию.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Print Processors
По умолчанию используется следующий обработчик печати
WinPrint
Чтобы определить обработчик печати, используемый принтером, с помощью средства MPS_REPORTS (Microsoft Product Support Reporting Tool)
откройте файл MachineName_PRINTDRIVERS.TXT и найдите в нем нужный обработчик печати независимого производителя и очереди, которые
его используют.
7. Замените обработчик печати независимого производителя обработчиком WinPrint.
8. Нажмите кнопку Пуск и выберите в меню Настройка пункт Панель управления.
9. Дважды щелкните значок Принтеры, щелкните правой кнопкой мыши нужный принтер и выберите команду Свойства.
10. Перейдите на вкладку Дополнительно и нажмите кнопку Обработчик печати.
11. В списке Обработчик печати выберите WinPrint.
12. Дважды нажмите кнопку ОК.
13. Закройте редактор реестра.


  После внесения изменений в реестр перезапустите диспетчер очереди печати. Для этого запустите консоль управления (MMC)
  sshot-2
и добавьте оснастки «Управление компьютером» или «Службы». Щелкните правой кнопкой мыши службу Диспетчер очереди печати
и выберите команду Пуск.


*При переполнении за сутки очереди печати чистим батником:
What you’re looking for is a line that ends with HPSF/NTFS (under the heading System). In our case, the device is “/dev/sda1”. This may be slightly different for you, but it will still begin with /dev/. Note this device name.


@echo off
If you have more than one hard drive partition formatted as NTFS, then you may be able to identify the correct partition by the size. If you look at the second line of text in the screenshot above, it reads “Disk /dev/sda: 136.4 GB, …” This means that the hard drive that Ubuntu has named /dev/sda is 136.4 GB large. If your hard drives are of different size, then this information can help you track down the right device name to use. Alternatively, you can just try them all, though this can be time consuming for large hard drives.
net stop spooler
echo y|del C:\WINDOWS\system32\spool\PRINTERS\*
net start spooler


*При печати клиента из терминального режима на локальный принтер в системном логе сервера появляется сообщение об ошибке:
Now that you know the name Ubuntu has assigned to your hard drive, we’ll scan it to see what files we can uncover.
Event ID: 1103 Description: An internal communication error occurred. Решение проблемы:
Это происходит, если имя принтера на рабочей станции не совпадает с именем
принтера на терминал-сервере. Как правило, это бывает, если в качестве клиента
используются компьютеры под управлением Windows 95/98/Me. Запишите название
принтера на рабочей станции в локальном режиме, затем начните установку этого
принтера на терминал-сервере и снова запишите его название. Затем откройте
файл %systemroot%\system32\Wtsuprn.txt и добавьте в него свой принтер. Уберите
значек комментария перед вносимой строкой, а полученный файл сохраните под
именем %systemroot%\system32\Wtsuprn.inf.
('''или скачайте этот файл тут:''' http://nixtech.ru/datatrans/win32/term-prn/wtsuprn.txt)
('''или тут:''' http://support.citrix.com/article/CTX626451)
log on на терминал-сервере. Затем подключитесь с клиентской рабочей станции. Ваш принтер
должен автоматически появится в папке Printers терминальной сессии.
('''Инструкция от Microsoft по установке''' http://support.microsoft.com/kb/214593)


*Полезные ссылки по решению проблем печати на терминальном сервере
In the terminal window, type:
('''Решение проблем печати в терминальных сетях и терминальных службах.''' http://admin-dm.livejournal.com/67401.html)


('''Совместимость имен принтеров при работе с терминальным сервером''' http://support.citrix.com/article/CTX626451)
sudo ntfsundelete <HD name>


('''Terminal Server Printer Redirection Wizard Tool''' http://www.microsoft.com/download/en/details.aspx?DisplayLang=en&id=5640)
and hit enter. In our case, the command is:


*Патч для увеличения максимального количества полуоткрытых соединений
  sudo ntfsundelete /dev/sda1
  Впервые данное ограничение было введено компанией Microsoft в SP2 (Service Pack 2) для Windows XP и присутствует в последующих
версиях Windows.
Это было сделано в попытке замедлить распространение вирусов с зараженного компьютера, а также ограничить возможности участия
компьютера в DoS-атаках (от англ. Denial of Service, отказ в обслуживании).
Ограничение заключается в том, что компьютеру не разрешается иметь более 10 одновременных полуоткрытых исходящих соединений.
При достижении предела новые попытки подключений ставятся в очередь. Таким образом, фактически ограничена скорость подключения
к другим компьютерам.
('''Патч Half-open limit fix''' http://half-open.com/download_ru.htm) позволяет убрать это ограничение, то есть увеличить
максимальный предел полуоткрытых соединений. Для подавляющего большинства пользователей будет достаточным предел, равный 100


*Оптимизация работы клиента на медленном канале:
sshot-3
'''Цельный курсор'''
Установка курсора немигающим очень эффективно в низкоскоростных соединениях. Мерцающий курсор посылает несколько байт
данных при каждом мерцании, и запрет мерцания экономит немного полосы пропускания.
HKEY_USERS/.default/Control Panel/Desktop
Установите значение CursorBlinkRate Reg_SZ -1 (1200)
'''Скорость обновления меню Start'''
Вы можете увеличить скорость обновления, чтобы уменьшить время ответа в меню.
"HKEY_USERS\DEFAULT\Control Panel\Desktop"
Добавьте значение: MenuShowDelay REG_DWORD: 10 (400)


*Полезные советы и ссылки:
The names of files that can recovered show up in the far right column. The percentage in the third column tells us how much of that file can be recovered. Three of the four files that we originally deleted are showing up in this list, even though we shut down the computer right after deleting the four files – so even in ideal cases, your files may not be recoverable.
('''Решение проблем с терминальным сервером и не только''' http://adsh.ukrweb.net/win2k/fido_faq_10.html)


*Без перезагрузки компьютера средствами командной строки, как правило, не обходится ни один диск автоматической установки Windows - это завершающая процедура, после которой компьютер уже готов к использованию. Перезагрузить компьютер можно различными способами.
Nevertheless, we have three files that we can recover – two JPGs and an MPG.
Команда shutdown


    shutdown.exe -r -f -t 20 -c "Don`t panic. The system will reboot in 20 seconds."
Note: ntfsundelete is immediately available in the Ubuntu 9.10 Live CD. If you are in a different version of Ubuntu, or for some other reason get an error when trying to use ntfsundelete, you can install it by entering “sudo apt-get install ntfsprogs” in a terminal window.


Справка: shutdown /?
To quickly recover the two JPGs, we will use the * wildcard to recover all of the files that end with .jpg.


* управление screensaver в терминальном сервере
In the terminal window, enter
[http://amaksimov.wordpress.com/2011/10/15/computer-block-lock-out-via-screen-saver-timeout-and-password-protect-with-gpp-group-policy-preferences/ screensaver в терминальном сервере]


'''944984 - на сервере стоит SP2 который уже идет с User Profile Hive Cleanup'''
  sudo ntfsundelete <HD name> –u –m *.jpg
  Service (UPHClean).
  906952 - на сервере отключен мап любых принтеров и остального,
  кроме дисков (флешки и флопы мапить), там отмечено, что эта проблема была учтена в SP2. Также
  там написано, что ее включить надо, так вот этот момент немного не понятен:


  To enable this hotfix, you must create the PrinterMaskKey registry subkey. To do
which is, in our case,
  this, follow these steps:


  1. Click Start, click Run, type regedit, and then click OK.
sudo ntfsundelete /dev/sda1 –u –m *.jpg
  2. Locate the following registry subkey:
  HKEY_USERS\.default\printers
  3. Right-click the registry subkey that you located in step 2, point to New,
  click Key, type PrinterMaskKey, and then press ENTER.
  4. Exit Registry Editor.
  Что конкретно нужно создать в ветке HKEY_USERS\.default\printers, если не
  трудно, поясните?
  '''''--В локаликозованной версии regedit Key = Раздел Т.е. надо создать подраздел
  PrinterMaskKey внутри HKEY_USERS\.default\printers'''''


[[Hotfix - terminal server win]]
sshot-10


== Настройка меню пользователя в Win2003 ==
The two files are recovered from the NTFS hard drive and saved in the current working directory of the terminal. By default, this is the home directory of the current user, though we are working in the Desktop folder.
*как скрыть пункт в меню Пуск - Администрирование, от терминальных пользователей?


В групповых политиках, конфигурации пользователя, административных шаблонах, в настройках меню "Пуск" отключите необходимые элементы.
Note that the ntfsundelete program does not make any changes to the original NTFS hard drive. If you want to take those files and put them back in the NTFS hard drive, you will have to move them there after they are undeleted with ntfsundelete. Of course, you can also put them on your flash drive or open Firefox and email them to yourself – the sky’s the limit!


Пример:
We have one more file to undelete – our MPG.


Конфигурация пользователя -> Настройка -> Параметры панели управления -> Главное меню
sshot-4


[[Файл:Win2008adm.jpg]]
Note the first column on the far left. It contains a number, its Inode. Think of this as the file’s unique identifier. Note this number.
 
To undelete a file by its Inode, enter the following in the terminal:
 
sudo ntfsundelete <HD name> –u –i <Inode>
 
In our case, this is:
 
sudo ntfsundelete /dev/sda1 –u –i 14159
 
sshot-11
 
This recovers the file, along with an identifier that we don’t really care about. All three of our recoverable files are now recovered.
<hr>
'''Resurses:'''
<hr>
* [https://www.howtogeek.com/howto/13706/recover-deleted-files-on-an-ntfs-hard-drive-from-a-ubuntu-live-cd/ Recover Deleted Files on an NTFS Hard Drive from a Ubuntu Live CD]

Версия от 23:39, 25 сентября 2017

To undelete our files, we first need to identify the hard drive that we want to undelete from. In the terminal window, type in:

sudo fdisk –l
and press enter.
sshot-2

What you’re looking for is a line that ends with HPSF/NTFS (under the heading System). In our case, the device is “/dev/sda1”. This may be slightly different for you, but it will still begin with /dev/. Note this device name.

If you have more than one hard drive partition formatted as NTFS, then you may be able to identify the correct partition by the size. If you look at the second line of text in the screenshot above, it reads “Disk /dev/sda: 136.4 GB, …” This means that the hard drive that Ubuntu has named /dev/sda is 136.4 GB large. If your hard drives are of different size, then this information can help you track down the right device name to use. Alternatively, you can just try them all, though this can be time consuming for large hard drives.

Now that you know the name Ubuntu has assigned to your hard drive, we’ll scan it to see what files we can uncover.

In the terminal window, type:

sudo ntfsundelete <HD name>

and hit enter. In our case, the command is:

sudo ntfsundelete /dev/sda1

sshot-3

The names of files that can recovered show up in the far right column. The percentage in the third column tells us how much of that file can be recovered. Three of the four files that we originally deleted are showing up in this list, even though we shut down the computer right after deleting the four files – so even in ideal cases, your files may not be recoverable.

Nevertheless, we have three files that we can recover – two JPGs and an MPG.

Note: ntfsundelete is immediately available in the Ubuntu 9.10 Live CD. If you are in a different version of Ubuntu, or for some other reason get an error when trying to use ntfsundelete, you can install it by entering “sudo apt-get install ntfsprogs” in a terminal window.

To quickly recover the two JPGs, we will use the * wildcard to recover all of the files that end with .jpg.

In the terminal window, enter

sudo ntfsundelete <HD name> –u –m *.jpg

which is, in our case,

sudo ntfsundelete /dev/sda1 –u –m *.jpg

sshot-10

The two files are recovered from the NTFS hard drive and saved in the current working directory of the terminal. By default, this is the home directory of the current user, though we are working in the Desktop folder.

Note that the ntfsundelete program does not make any changes to the original NTFS hard drive. If you want to take those files and put them back in the NTFS hard drive, you will have to move them there after they are undeleted with ntfsundelete. Of course, you can also put them on your flash drive or open Firefox and email them to yourself – the sky’s the limit!

We have one more file to undelete – our MPG.

sshot-4

Note the first column on the far left. It contains a number, its Inode. Think of this as the file’s unique identifier. Note this number.

To undelete a file by its Inode, enter the following in the terminal:

sudo ntfsundelete <HD name> –u –i <Inode>

In our case, this is:

sudo ntfsundelete /dev/sda1 –u –i 14159

sshot-11

This recovers the file, along with an identifier that we don’t really care about. All three of our recoverable files are now recovered.


Resurses: