понедельник, 30 мая 2011 г.

TRUSTBAR.NLM

Using TRUSTBAR.NLM to backup file system trustees

This document (3925492) is provided subject to the disclaimer at the end of this document.

Environment

Novell NetWare 5.0
Novell NetWare 5.1
Novell NetWare 6.0
Volumes Traditional and NSS.
Network Storage Services (NSS)

Situation

Using TRUSTBAR.NLM to backup file system trustees

Resolution

In order to backup file system trustees on an NSS volume before a NetWare 6 inplace upgrade or an across the wire migration, TRUSTBAR.NLM should be used. TRUSTBAR.NLM can be found on the NetWare 6 shipping CD in the PRODUCTS\NCS directory. TRUSTBAR will backup both NSS and Traditional volumes. HINT: Use CONLOG.NLM to log all error messages written to the screen. NOTE: TRUSTBAR does NOT work with NetWare 4.x.

NOTE: Logins must be enabled for TRUSTBAR to work. Make sure that logins are enabled before running.

TRUSTBAR usage:

TRUSTBAR [path]: [-options]

OPTIONS: H B R D V
-H Help
-B Backup trustees
-R Restore trustees
-D Delete trustees
-V Verbose (outputs results to the console)



TO BACKUP TRUSTEES
To back up all file system trustees on VOL2, type the following at the system console prompt:

TRUSTBAR VOL2: -B -V (don't forget the COLON after the volume name)

The output will be similar to the following:
TRUSTBAR: server FS1 DN CN=FS1.OU=Servers.O=novell serverID 0
TrustBar_Trustees(VOL2:Email/Secretary): backup TID 0xB612 name CN=kjones.O=novell rights 83
TrustBar_Trustees(VOL2:Email/Secretary): backup TID 0xB6A1 name CN=dsmith.O=novell rights 65

TRUSTBAR creates a file at the root of whatever volume being backed up called "trustees.xml". Once the file is created, it can be renamed and moved elsewhere. WARNING: if you run TRUSTBAR on a volume which already has a "trustees.xml" file at the root of the volume, the file will be overwritten.



TO RESTORE TRUSTEES
To restore file system trustees, type the following at the console:

TRUSTBAR VOL2:\trustees.xml(or different filename) -R -V (Remember the COLON after the volume name)

The XML file must be somewhere on the volume on which the trustees are being restored, but not necessarily at the root of the volume. If the XML file were in a sub directory called TEMP and the file was renamed to VOL2.XML, the following command would be used:

TRUSTBAR VOL2:\temp\vol2.xml -R -V



TO DELETE TRUSTEES
To delete all file system trustees on VOL2, type the following at the system console prompt:

TRUSTBAR VOL2: -D (don't forget the COLON after the volume name)

***NOTE - This will remove trustee assignments without warning. Please verify that you have Backed up your Trustee Assignments before doing so.***

Additional Information


Formerly known as TID# 10066145

пятница, 27 мая 2011 г.

Создание snapshot в Netware

 Взято от сюда http://www.novell.com/coolsolutions/appnote/17000.html


Let's assume that the production server has a DATA pool and a DATA volume. We want to create a snapshot of the DATA pool hosted on the DATA pool. To do this, key the following commands on the production server.
  1. To create snapshot: mm snap create DATA DATA DATA_S1
  2. The syntax to create a snapshot is: mm snap create snappool datapool snapname The snappool is the pool that I want to take a snapshot of. In this case, it is DATA The datapool is the pool that the snapshot should reside. In this case, it is also DATA. The snapname is the name of my snapshot. In this case, it is DATA_S1
  3. To activate snapshot: mm snap activate DATA_S1
  4. To mount the data volume on the snapshot pool: mount DATA_SV
  5. To deactivate snapshot: mm snap deactivate DATA_S1
  6. To delete snapshot: mm snap delete DATA_S1
Therefore, what we want to achieve is to create and activate a snapshot before the RSYNC synchronization and then after the synchronization is completed, deactivate and delete the snapshot. To achieve this, modify the SYS:\ETC\CRONTAB to include the following lines:
    0 18 * * * TRUSTBAR DATA: -B -V 0 19 * * * SYS:\SYSTEM\CREATESNAPSHOT.NCF 0 20 * * * SYS:\SYSTEM\DATABACKUP.NCF 0 6 * * * SYS:\SYSTEM\DELSNAPSHOT.NCF
where CREASNAPSHOT.NCF contains the following lines:
    mm snap create DATA DATA DATA_S1 delay 60 mm snap activate DATA_S1 delay 60 mount DATA_SV
where DATABACKUP.NCF contains the following lines:
    rsync -rRutvP --delete --volume=DATA_SV: / [IP address of Backup server]::DATA Note: The volume is now DATA_SV not DATA
where DELSNAPSHOT.NCF contains the following lines
    dismount DATA_SV delay 60 mm snap deactivate DATA_S1 delay 60 mm snap delete DATA_S1

 ---------------------------------------------
MM SNAP LIST

wget - Скачать содержимое каталога и подкаталогов

Скачать содержимое каталога и подкаталогов

wget -r --http-user=имя --http-password=пароль --no-parent --level=2 http://сервер.ru/path_to_file/demo/

или
wget -r  --no-parent --level=2 http://имя:пароль@сервер.ru/path_to_file/demo/

-r                  - рекурсивно
--no-parent   - не скачивать вышестоящие каталоги
--level=2       - глубина вложения

вторник, 24 мая 2011 г.

Просмотр неактивных пользователей в AD

неактивные в течении трех недель пользователи в AD

dsquery user dc=domain,dc=dom -inactive 3


Документация http://technet.microsoft.com/es-es/library/cc725702%28WS.10%29.aspx

четверг, 19 мая 2011 г.

Как сравнить пользователей в LDAP по членству в группах.

Пример скрипта на BASH. Запрос к серверу LDAP (eDir 8.7 атрибут groupMembership)
Выбирается список групп для первого и второго пользователя, нет проверки на дублирующиеся имена (считаем все имена пользователей уникальны)
Запуск: имя_скрипта имя_1_пользователя имя_2_пользователя

#!/bin/bash
#
# Запросы к LDAP серверу
#
if [ -z $1 ];then
echo
echo $"Usage: $0 имя_пользователя_1 имя_пользователя_2 "

exit 1
fi
if [ -z $2 ];then
echo
echo $"Usage: $0 имя_пользователя_1 имя_пользователя_2 "

exit 1
fi

#ldapsearch -h 192.168.30.5 -x -b o=farm -s sub '(cn=alex)' groupMembership | grep '^groupMembership' | awk '{print($2)}' | sort

ldapsearch -h 192.168.30.5 -x -b o=farm -s sub "(cn=$1)" groupMembership | grep '^groupMembership' | awk '{print($2)}' | sort > user_group_$1
ldapsearch -h 192.168.30.5 -x -b o=farm -s sub "(cn=$2)" groupMembership | grep '^groupMembership' | awk '{print($2)}' | sort > user_group_$2

cat user_group_$1 user_group_$2 | sort | uniq -c | grep '2' | awk '{print($2)}' > tmp_equal
echo "группы членами которых являются $1 и $2 "
cat tmp_equal
echo "Группы членом в которых состоит $2, но не состоит $1"
cat user_group_$2 tmp_equal | sort | uniq -c | grep '1' | awk '{print($2)}'
echo "Группы членом в которых состоит $1, но не состоит $2"
cat user_group_$1 tmp_equal | sort | uniq -c | grep '1' | awk '{print($2)}'