Teamviewer под Ubuntu

http://www.tonisoto.com/2013/07/launching-teamviewer-remotely-throught-ssh/
  1. Login into your home linux box through ssh. Don’t use root access unless it was necessary. Use ‘sudo’ instead.
  2. Locate where teamviewer is installed:
    user@home_machine:~$ whereis teamviewer
    teamviewer: /usr/bin/teamviewer /etc/teamviewer
  3. Now run this command to get the list of commands:
    user@home_machine:~$ /usr/bin/teamviewer –help
    TeamViewer 8.0.17147 <-- Your version
     teamviewer start TeamViewer user interface (if not running)teamviewer --help print this help screen
      teamviewer --version ;  print version information
      teamviewer --info ; print version, status, id
      teamviewer --passwd [PASSWD] ; set a password (useful when installing remote (ssh)
     teamviewer --daemon restart ; stop/start TeamViewer daemon

Превращаем DB60 DTE в DCE и делаем переходник

1. У выбранного кабеля вскрываем DB60, отрезаем 52 контакт от группы 50-51-52. Закрываем DB-60
2. Смотрим что на выходе: если 232, то одна схема, если 530 - другая схема.

Для переходников используем DB25female-DB25female
Спаиваем нутрянку по выбранной схеме и вуаля.
проверяем соединение:
show controllers serial x/x
show int serialx/x
debug serial interface

Jerry Lee Ford - Microsoft Windows PowerShell 2.0 Programming for the Absolute Beginner (2nd Ed) 2008 - Ch3

Ch. 3
Нам обязательно поможет в изучении Powershell
Listing тут

Команды PowerShell

Список команд и переменных

Jerry Lee Ford - Microsoft Windows PowerShell 2.0 Programming for the Absolute Beginner (2nd Ed) 2008

Книга посвящена Ver2, Ver 3 Powershell'а

Pipeline
cmd.exe, данные передаются как текст => затруднения, когда ожидаемяй формат отличается от необходимого.
Windows PowerShell возвращает объекты, к свойствам или методом обращается второй командлет.
"With object piping, the programmer is relieved of the responsibility of formatting object data, significantly simplifying the scripting process." - стр. 9
Listing тут

[Специалист] Автоматизация административных задач при помощи Windows PowerShell 3.0 [2015, RUS]

Видео 1-3

И то, что удалось извлечь

Richard Siddaway - PowerShell in Practice - 2010

Просмотрел 1-е 4 главы.
Нет заданий в конце каждой главы. Рассматривает PS ver.2, ver.3
Форум тут. Из книги запустил скрипты:

Взаимодействие с WMI
Время последней  перезагрузки
Get-WMIObject -Class Win32_OperatingSystem -property LastBootUpTime | foreach {[System.Management.ManagementDateTimeConverter]::ToDateTime($_.LastBootUpTime)}

ИД процесса приложения notepad.exe
Get-WmiObject -Class Win32_Process -Filter 'Name = "notepad.exe"' | Select Name, Processid | Format-Table -AutoSize

try to connect two modules: WIC-1T and WIC-2T by this cables: DB60-V35MT + V35(female)-RS232(male) + SS-RS232FC. All cables standard length, about 3 meters. This means that summary length of all cables about 6 meters. I configure this modules on 2651XM, IOS 12.3.Lights on both modules green, but "Serial1/0 is up, line protocol is down "

Hello, friends.
I try to connect two modules: WIC-1T and WIC-2T by this cables: DB60-V35MT + V35(female)-RS232(male) + SS-RS232FC. All cables standard length, about 3 meters. This means that summary length of all cables about 6 meters. I configure this modules on 2651XM, IOS 12.3.Lights on both modules green, but "Serial1/0 is up, line protocol is down "
DB60-V35MT + V35(female)-RS232(male) - are from the right side of the photo.
cables


Wic-1T configuration (DTE)
interface Serial1/0
ip address 10.0.0.2 255.255.255.0
encapsulation ppp
Wic-2T configuration (DCE)
interface Serial0/1
ip address 10.0.0.1 255.255.255.0
encapsulation ppp
clockrate 2000000
dce-terminal-timing-enable

Serial1/0 is up, line protocol is down
Hardware is DSCC4 Serial
Internet address is 10.0.0.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set
Keepalive set (10 sec)
LCP Listen
Closed: IPCP, CDPCP
Last input never, output 00:02:51, output hang never
Last clearing of "show interface" counters 00:03:56
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
11 packets output, 154 bytes, 0 underruns
0 output errors, 0 collisions, 4 interface resets
0 output buffer failures, 0 output buffers swapped out
29 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up


Serial0/1 is up, line protocol is down
Hardware is PowerQUICC Serial
Internet address is 10.0.0.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP REQsent, loopback not set
Keepalive set (10 sec)
Last input never, output 00:00:00, output hang never
Last clearing of "show interface" counters 00:04:15
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
52 packets output, 728 bytes, 0 underruns
0 output errors, 0 collisions, 16 interface resets
0 output buffer failures, 0 output buffers swapped out
10 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
чтобы распаковать tgz в Linux, вам необходимо
tar -zxvf archive.tgz
где archive.tgz - имя tgz архива, который вам нужно распаковать.

Lubuntu внутри домашней сети

Не мог установить, пока не поменял адресное пространство. Мой Netgear напрочь отказывался пропускать вовне сеть 169.254.0.X / 24
После сброса в дефолтный конфиг - пинги пошли и настала пора конфига SAMBA
https://ubuntuforums.org/showthread.php?t=1623346
To enable file sharing on a Lubuntu 10.10 machine, go to Preferences > Synaptic Package Manager and add the following:-
* samba
* system-config-samba
* gvfs-bin
* gvfs-backends
После всего ярлык SAMBA не хотел запускаться
 - отсутствовал пакет gksu
решено: Установил
 - при запуске через ком. строку не находился
SystemError: could not open configuration file `/etc/libuser.conf': No such 
file or directory 
решено: sudo touch /etc/libuser.conf 
 
Настройка SAMBA 
Если SAMBA не хочет запускаться, после смены места монтирования папок, то проще её переустановить:
sudo apt-get purge samba-common
sudo apt-get autoremove
sudo apt-get update
sudo apt-get install samba smbclient
 
проверка smbclient -L 127.0.0.1 -N
 
Не знаю, почему так получилось.. прописал ip-адрес и имя сервера в 
windows\system32\drivers\etc\hosts и монтировал по имени, а не по 
адресу: 
net use m: \\alexlaptop\ktorrent 
 
 
Настройка SSH:
 This service will start running as soon as it is installed. To verify this, you can do
-  sudo apt-get install openssh-server  
- ssh localhost
yes to the question about the unknown fingerprint and do you want to continue connect, and then providing your password. You will then log in to your own local computer over SSH. This is pretty useless, except as a test, so type
- exit 
to end that SSH session.  
 
 
 
Качаем и ставим Teamviewer: sudo dpkg -i teamviewer_linux_x64.deb  
1. лечим отсутствие зависимостей: sudo apt-get -f install
2. доставляем Dependency is not satisfiable: libpng12-0
3. еще раз ставим sudo dpkg -i teamviewer_linux_x64.deb

сессия в кармане. )))
 
 
Запуск Utserver из командной строки 
utserver -settingspath /opt/utorrent-server-alpha-v3_3/ & 
 
Установка HAMACHI для доступа извне: 
https://help.ubuntu.com/community/Hamachi 
http://ubuntovod.ru/instructions/hamachi-ubuntu-linux.html
Ставим на Lubuntu и на Win клиента. Из-под Ubunta создаем сеть. Клиентом цепляемся к ней, получаем SSH сессию
 
Теперь чтобы подключиться защищенным пользователем без прав, надо:
1. Создать пользователя, Задать ему каталог, описание, shell, имя
sudo useradd -m -d /home/user2 -c "user for R2" -s /bin/bash user2 
2. Задать скрипт для запуска .bash_profile со стартом telnet сессии на нужный порт:
#!/usr/bin/expect -f
set timeout 20
set IPaddress 192.168.1.253
telnet $IPaddress XXXX
exit
3. сменить у скрипта группу chgrp и владельца chown на соответствующего пользователя
4. задать пароль пользователю passwd
 
 
Список команд mc (http://mydebianblog.blogspot.ru/2011/01/midnight-commander.html) 
Распечатать: https://cloud.github.com/downloads/drakulavich/russian-mc-cheatsheet/rmc.pdf

Связь 2 роутеров кучей кабелей

Стенд разрастается.
Типы памяти CISCO 2600
Достал несколько WIC-1T, WIC-2T.
Нашел кабели
DB60-V35MT с переходником на 232MT и кабели SS-232FC.

Задача - состыковать, чтобы закупить недостающую 2522 или NM-8A/S и собрать Frame-Relay
Each serial WIC has one LED, labeled CONN for each port, which lights when the serial port is connected. CONN LED indicates:
       port is in DTE mode, the have been detected
             Data Send Ready (DSR),
             Data Carrier Detect (DCD),
             and Clear To Send (CTS) .
       port is in DCE mode, have been detected
             Data Terminal Ready (DTR)
             Ready To Send (RTS) .


Конфиги стандартны для DCE (clock rate) и DTE, по умолчанию encapsulation = HDLC.
Диагностика:
debug serial interface
debug interface serial 3
undebug all
  
И...
Оказывается белые переходники не EIA-232, а EIA-530, соответственно связаться с SS-232 они не могут (http://www.advancedrelay.com/downloads/pinouts-for-serial-interfaces.pdf).

Powershell

Powershell ссылки и материалы
Windows Powershell ISE [АйЭсИ]
Центр сценариев Microsoft

 Если модулей маловато, для Windows 7 смотрим тут и тут (RSAT - 1 (SP1) ) - качать 289 МБ.
Для Windows 10 - RSAT (remote Server Administration Tools) - требуется перезагрузка
Модули также зависят от ОС, таким образом в PowerShell Windows 7 нет того, что есть в Win2012 и Server2012