czwartek, 7 marca 2013

Mikrotik with Active Directory


AAA with Active Directory

Also refer to this forum post:
How to setup Hotspot AAA Microsoft IAS RADIUS for use with MikroTik – By Rodney Yeo: [1]

Example One

MT setup
 /ip radius add
   service=ppp,wireless
   address=
   secret=
   authentication_port=1812
   accounting_port=1813
 /ip ppp AAA
   use_radius=yes
   accounting=yes
 /ip ppp pptp-server
   enabled=yes
   authentication=mschap1,mschap2
Windows Setup
 Start->Control Panel-Administrative Tools->Internet Authentication Service
 Right-click on RADIUS Clients->New
 Friendly Name: MikroTik
 Address: 
 Client-Vendor: RADIUS Standard
 Shared secret: 

Example Two

Part A - Setup IAS RADIUS on Active Directory Services
Setup IAS on a server acting as Active Directory Services Domain Controller and register it’s services. IAS-Setup1.JPG
Give a meaningful description and enable logging for authentication status. IAS-Setup2.JPG
User respective 1812 for Authentication and 1813 for Accounting port only. IAS-Setup3.JPG
Create a Realms profile, find “User-Name” replace it with “DOMAIN\User-Name” variables into IAS. IAS-Setup4.JPG
Create a “hotspot.com” client profile and set IP address pointing to MikroTik hotspot server 172.19.1.253. Set Client Vendor to RADIUS Standard and enter a unique password for IAS. Do not enable Attributes Signature check box. IAS-Setup5.JPG
Enable Remote Access Logging check box for all properties. IAS-Setup6.JPG
Select IAS Format and set Log Time Period to Daily. IAS-Setup7.JPG
Create Remote Access Policies profile to “hotspot.com”. Add “Windows-Groups” matches “DOMAIN\Username” profile. Enable Grant remote access permission. IAS-Setup8.JPG
At Authentication tab Enable check box for “MS-CHAP v2, MS-CHAP, CHAP and PAP” method. Note HotSpot only uses PAP method. IAS-Setup9.JPG
At Encryption tab Enable all the check box allowed by this profile. IAS-Setup10.JPG
At Advance tab do not add any additional connection attributes. IAS-Setup11.JPG

Part B - Setup IAS RADIUS with MikroTik
Add a RADIUS server profile and enable service for “hotspot”. Enter IP Address of IAS RADIUS server. Enter the same password created earlier for RADIUS secret. Use port 1812 for Authentication and 1813 for Accounting with Timeout at 300ms. IAS-MT-Config1.JPG
At “Hotspot Server Profiles” Login By check “HTTP PAP” only. IAS-MT-Config2.JPG
At “Hotspot Server Profiles” check Use RADIUS and Accounting. NAS Port Type leave it as (19 wireless-802.11) or change to 15 (Ethernet) mode. IAS-MT-Config3.JPG

Part C – Testing IAS RADIUS with PC
  1. Use NTRadPing Test Utility to verify the communication link with a test PC. http://www.dialways.com/download/
  2. Remember to add in the test PC IP Address intended for testing into the IAS Client Profile before initiating test.
  3. Enter the IAS RADIUS server IP Address and port “1812” for Request Type “Authentication Request” mode followed by the RADIUS Secret Key. IAS-Test1.JPG
  4. Also enter the User-Name found in the Active Directory Service User Domain Lists. If successful response reply will be “Access-Accepted”.
  5. Next change port to “1813” for Request Type “Accounting Start” click send and reply should be “Accounting-Response” if the RADIUS server is working. IAS-Test2.JPG
Part D – Activating Domain Users for IAS RADIUS
Check for respective User properties if they are member of “RAS and IAS Server” groups, if not add them as group members. AD-User IAS1.JPG
Next check the Dial-in tab and enable Allow access for Remote Access Permission. AD-User IAS2.JPG

środa, 16 stycznia 2013

Command Line to Uninstall Software on Remote PCs

Korzystanie z wiersza polecenia, aby odinstalować oprogramowanie na zdalnych komputerach

przez Roeman_p_jack_small
870


Pikanterii

Kroki

WMIC (Windows Management Instrumentation Command-Line) jest silnym narzędziem, które często nie widzi pożytku z powodu braku (łatwo dostępne) dostępnej dokumentacji. Więcej informacji można znaleźć na WMIC tutaj:http://technet.microsoft.com/en-us/library/bb742610.aspx . Niektóre wielkie przełączniki i alternatywne opcje można znaleźć Będziemy używać WMIC z poświadczeniami administratora domeny, aby przedzierać się przez listy węzłów (PC / Laptop) i odinstalować przykładowy program bez przerywania użytkownika.
1 .

Załadować do powłoki poleceń z odpowiednimi uprawnieniami dostępu

Choć WMIC instrukcja może mieć odpowiednie poświadczenia przed operacją, to zazwyczaj najlepsze praktyki, aby uniknąć zwykłego tekstu, wpisując hasło (które jest, że patrząc przez ramię ;)). Będziemy wykonywać polecenia runas w następujący sposób:
Runas / user: DomainAdminAccount @ domena cmd
... Który poprosi nas o mandatów naszej DomainAdminAccount. Jeżeli uwierzytelniony, będziemy wręczył powłokę poleceń w pracy jako administrator.
Opencmdadminprompt_big
2 .

Krok w WMIC

Jedną z miłych cech WMIC to, że można uruchomić z dowolnego komputera. Z naszego admina powłoki poleceń, mamy zamiar wprowadzić polecenie WMIC następnie wprowadzić. (Uwaga: Mogliśmy wskoczył WMIC bezpośrednio z polecenia runas ... to po prostu wybucha kroki)
Wmiccommand_big
3 .

Sprawdzenie instalacji programu (opcjonalne informacyjny krok)

Dzięki naszej aplikacji WMIC polecenia, możemy prosić o wiele pytań węzła (lub węzłów) i otrzymać kilka ładnie sformatowane odpowiedzi. Choć formatowanie odpowiedzi jest poza zakresem tego "Jak", dużo więcej informacji można znaleźć w Internecie.
Warto więc dowiedzieć się, czy dany węzeł ma nawet naszego oprogramowania docelowego (Spiceworks robi próbę wpisaniu tych informacji w jej skanowania oprogramowania)
> / Node: Produkt COMPUTERNAME dostać nazwa, wersja, sprzedawca
To polecenie zwraca WMI odpowiedzi z listy w tym nazwa, wersja i dostawcą wszystkich zgodnych instalacji oprogramowania.
Jeśli chcesz filtrować dla konkretnego produktu, może to zrobić. Oto przykład skanowania komputer sieciowy dla wszystkich zainstalowanych aplikacji z zbywcy "Apple, Inc"
> / Node: Produkt ANOTHEREXAMPLE gdzie vendor = "Apple Inc" Pobierz nazwę, sprzedawca
(* Uwaga od Anders4221:
mała wskazówka jeśli masz specjalne znaki takie jak '-' lub '/' w nazwie komputera trzeba użyć "" znaki w celu uzyskania informacji od klienta)
(Uwaga ** od Joe3034:
Oto jak można używać znaków specjalnych w wyszukiwaniu:
Otoczyć jak frazę w cudzysłów i kryteria wyszukiwania w apostrofach i użyć% jako symbolem wieloznacznym.
np.:
/ node: Produkt ComputerXYZ gdzie "sprzedawca jak" adobe% '"Pobierz nazwę, wersję, identifyingNumber)
Vendorexample_big
4 .

Zaproszenie do deinstalacji

Więc możemy zadzwonić do interfejsu WMI odinstalować dany produkt ... niech wybrać na panelu sterowania MobileMe z naszego poprzedniego przykładu. Polecenie:
> / Node: Produkt Przykład gdzie name = "MobileMe Control Panel" call odinstalować
... poprosi o potwierdzenie, w kolejnym (long) formacie:
Wykonać Panel sterowania ", Version =" 2.1.0.24 ") -> Uninstall () (Y / N /)?
.. na które musisz odpowiedzieć "y" jeśli chcesz odinstalować. Oprogramowanie zgodne WMI będzie działać procedury uninstalation domyślne bez użytkownika, która chciałaby zrobić wszystko (nie otrzymają żadnych podpowiedzi itp).
** Zauważ, że możesz również użyć
/ nointeractive banderą jak / węzła: produkt PRZYKŁAD where name = "MobileMe Control Panel" call uninstall / nointeractive zapobiec żądania potwierdzenia!
-THX Bart2691
Mobilemeuninstalled_big
5 .

Zadzwoń Uninstall listy maszyn (opcjonalnie informacyjny krok)

Załóżmy, że właśnie dostaliśmy wiadomość, że Adobe Reader ma poważną wadę w jego starej wersji. W panice, to poprosił wszystkich użytkowników, aby ślepo zainstalować nową wersję programu Adobe Reader prosto z witryny firmy Adobe. Na szczęście, wszystkie udało się zrobić ... jednak masz otrzymała 3 bilety do tej pory o ikony Acrobat.com na pulpicie.
Masz mieszkanie plik tekstowy z komputera wszystkich nazw przechowywanych w katalogu c: \ komputery.txt. Pop otworzyć WMIC powłoki z odpowiednimi uprawnieniami i wpisz następujące polecenie:
> / Failfast: on / node: @ "c: \ komputery.txt" produkt where name = "Acrobat.com" uninstall call / nointeractive
Który przechodzi przez liście, omijając węzły, które są nieprawidłowe (np. urządzenie jest wyłączone), a które nie spełniają kryteriów. Musisz potwierdzić, 'y', które chcesz odinstalować na każdym węźle chyba, że ​​używasz nointeractive banderą.
* Aktualizacja Uwaga od Bart2691
... łatwy sposób na automatyzację odpowiedzi "Tak". Przykłady to robić za pomocą komputera lub pliku tekstowego jest użycie / nointeractive banderą. Dodatkowo, jeśli nie chcą powiesić na nieudanych węzłów użyć / failfast: na flagę, aby szybko pominąć węzła, który nie odpowiada.
** Nota true911 (niepotwierdzone)
prawidłowa flaga jest failfast: on nie fastfail: na
wmic / failfast: on / node: @ "plik.txt" produkt, gdzie "nazwa jak" Microsoft Office Professional Edition 2003 "" połączenia odinstalować / nointeractive

Konkluzja

Mam nadzieję, że już zaintrygowany potencji WMIC. Choć wiersza poleceń Korzystanie z połączenia dezinstalacji może być powszechnie potrzebne narzędzia do zarządzania oprogramowaniem, reklama, itp. .. czasami może być najlepszym sposobem wykonania zadania szybko, bez zakłócania użytkownika (ów).
Miejmy nadzieję, że jego wykonanie zajmuje Spiceworks WMI krok dalej w przyszłej wersji i automatyzuje to dla nas ;)

wtorek, 13 listopada 2012

View an RSoP report at the command line


Aktualne Group Police na danym serwerze

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To view an RSoP report at the command line

  1. Open Command Prompt.
  2. At the command prompt, redirect the output to a text file by typing:

    gpresult /z >gp.txt
  3. At the command prompt, open the file by typing:

    notepad gp.txt
Notes
  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.
  • To view all of the gpresult command-line parameters, see Related Topics.

poniedziałek, 12 listopada 2012

Lotus Domino - replicate cmd


Replicate
Where:
      • -- Server with which to replicate
      • -- One of the following: PUSH, PULL, or BOTH (optional; default is BOTH)
      • -- List of files to replicate -- for example, TESTREP1.NSF|TESTREP2.NSF (optional; default is ALL)
      • -- One or more of these options. Use the split vertical bar (|) to separate options.

      UPDATE_COLL -- Update collectionsCLOSE_SESSION -- End session with server when done
      SUMMARY_ONLY -- Only replicate summary fields
      TRUNCATE -- Truncate long documents
      PRI_LOW -- Replicate low-priority databases
      PRI_MED -- Replicate medium-priority databases
      PRI_HI -- Replicate high-priority databases

      Na serwerze gdzie niema pliku wpisujemy

      pull [nazwa serwera gdzie jest plik] mail\jkowalski.nsf

czwartek, 8 listopada 2012

Run Audit Log Windows + SNARE

http://cyberoperations.wordpress.com/2012-class/05-windows-logging-and-file-sharing/

http://www.neondemon.com/archives/how-to-monitor-file-and-folder-access-on-a-windows-file-server

http://www.intelliadmin.com/index.php/2008/03/use-auditing-to-track-who-deleted-your-files/

poniedziałek, 22 października 2012

Grandfather-father-son


Backup rotation scheme

From Wikipedia, the free encyclopedia
backup rotation scheme refers to a system of backing up data to computer media (such as tapes) that minimizes, via re-use, the number of media used. The scheme determines how and when each piece of removable storage is used for a backup job and how long it is retained once it has backup data stored on it. Different techniques have evolved over time to balance data retention and restoration needs with the cost of extra data storage media. Such a scheme can be quite complicated if it takes incremental backups, multiple retention periods, and off-site storage into consideration.

Contents

  [hide

[edit]Schemes

[edit]First In, First Out

First In, First Out (FIFO) backup scheme saves new or modified files onto the oldest media in the set. Performing a daily backup onto a set of 14 media, the backup depth would be 14 days. Each day, the oldest media would be inserted when performing the backup. This is the simplest rotation scheme, and is usually the first to come to mind. It was commonly used when floppy disks were used as backup media.
Advantages of the FIFO scheme include:
  • Used to keep the longest possible tail of daily backups
  • Used when archived backups are not as important (i.e. no need to go back one year)
  • Useful when data before the rotation period is irrelevant
This scheme, however, suffers from the possibility of data loss. To understand why, consider a file in which an unsuspected error is introduced. Several generations of backups and revisions have since occurred. The error is then detected. At this time, it would be pointless to have all of the most recent generations because all of them have the error. It would instead be beneficial to have at least one of the older generations, as it would not have the error.

[edit]Grandfather-father-son

Grandfather-father-son backup refers to a common rotation scheme for backup media. Originally designed for tape backup, it works well for any hierarchical backup strategy. The basic method is to define three sets of backups, such as daily, weekly and monthly. The daily, or son, backups are rotated on a daily basis with one graduating to father status each week. The weekly or father backups are rotated on a weekly basis with one graduating to grandfather status each month. In addition, quarterly, biannual, and/or annual backups can also be separately retained. Often one or more of the graduated backups is removed from the site for safekeeping and disaster recovery purposes.

[edit]Tower of Hanoi

The Tower of Hanoi rotation method is more complex. It is based on the mathematics of the Tower of Hanoi puzzle, with what is essentially a recursive method. It is a 'smart' way of archiving an effective number of backups as well as the ability to go back over time, but it is more complex to understand. Basically, every tape is associated with a disk in the puzzle, and every disk movement to a different peg corresponds with a backup to that tape. So the first tape is used every other day (1, 3, 5, 7, 9,...), the second tape is used every fourth day (2, 6, 10, ...), the third tape is used every eighth day (4, 12, 20, ...).[1]
A set of n tapes (or tapes sets) will allow backups for n-1 days before the last set is recycled. So, three tapes will give four days worth of backups and on the fifth day Set C will be overwritten; four tapes will give eight days, and Set D is overwritten on the ninth day; five tapes will give 16 days, etc. Files can be restored from 1, 2, 4, 8, 16, ..., n - 1 days ago.[2] Mathematically, you can look at the sequence of the binary notation of the day number. In each step, the number of zeros on the (right) end of the number determines the tape number to use.
The following tables show which tapes are used on which days of various cycles. Note that the Towers of Hanoi rotation method has the drawback of overwriting the very first backup (day 1 of the cycle) after only two days. However, this can easily be overcome by starting on the last day of a cycle (marked in red in the tables).

[edit]Three-tape Hanoi schedule

Day of the Cycle
0102030405060708
SetAAAA
BB
CC

[edit]Four-tape Hanoi schedule

Day of the Cycle
01020304050607080910111213141516
SetAAAAAAAA
BBBB
CC
DD

[edit]Five-tape Hanoi schedule

Day of the Cycle
0102030405060708091011121314151617181920212223242526272829303132
SetAAAAAAAAAAAAAAAA
BBBBBBBB
CCCC
DD
EE

[edit]Weighted random approach

An alternative approach to keeping generations distributed across all points in time is to delete (or overwrite), past generations (except the oldest and the most-recent-ngenerations) when necessary in a weighted-random fashion. For each deletion, the weight assigned to each of the deletable generations is the probability of it being deleted. One acceptable weight is a constant exponent (possibly the square) of the multiplicative inverse of the duration (possibly expressed in the number of days) between the date of the generation and the generation available before it.
Using a larger exponent leads to a more uniform distribution of generations, whereas a smaller exponent lead to a distribution with more recent and fewer older generations. This technique probabilistically ensures that past generations are always distributed across all points in time as desired.

[edit]Incremented media method

This method has many variations and names. A set of numbered media is used until the end of the cycle. Then the cycle is repeated using media numbered the same as the previous cycle, but incremented by one. The lowest numbered tape from the previous cycle is retired and kept permanently. Thus, one has access to every backup for one cycle, and one backup per cycle before that. This method has the advantage of ensuring even media wear, but requires a schedule to be precalculated. The system is generally too complex to mentally calculate the next media to be used.

sobota, 13 października 2012

Lotus Notes ADSync

http://www.ibm.com/developerworks/lotus/library/domino-adsync/