Saturday, November 5, 2011

Impressive NTP results

Last week, I received a complaint from one of the application support teams that the system time is not in sync with the stock exchange clock. It's known that domain members sync their time with domain controllers but I found there was around 0.8 offset! Does it mean that there was something wrong with the time client running on this server?

Friday, October 28, 2011

Use Exmerge to export mailboxes to .PST

Last week we had to migrate almost 200 mailboxes from one domain to another. Since there was no trust between the 2 domains, we handled both the exporting and importing operations separately. The source Exchange server was 2003 and the destination server was Exchange 2007. Exmerge was intuitive option for export the mailboxes to PST files but it has 2 limitations:

Friday, July 29, 2011

تعديل خصائص صندوق بريد

احتجت لتعديل خصائص صندوق بريد على Exchange 2003 وذلك لعمل ما يشبه ابطال صندوق البريد، وللقيام بهذا باستخدام VBScript قمت بكتابة الكود التالي

Sunday, June 26, 2011

Ping in VBA

اذا كنت تريد التأكد من وجود مجموعة من الاجهزة على الشبكة يمكنك تنفيذ الكود التالي. هذا على افتراض عدم وجود ما يمنع الاجهزة من الاتصال من جدار ناري او ما شابه. الكود يقوم بعمل دورة على كل الاجهزة الموجود في صفحة اكسيل حيث اسماء الاجهزة مكتوبة في العمود ايه

Monday, April 18, 2011

Dynamic approval in SM7

In a previous project, dynamic approval was required such that different users have to approve a change depending on the system ID. SM7 does not provide such facility. You can customize the approver list depending on the change type which may not meet the customer requirements.

Saturday, April 16, 2011

HP OVS M7 notes 3


  • $G.locked, $L.locked to check if file is locked.
  • If ($L.save.mode="reopen") then ($L.notify.name="IM Edit Reopen".
  • In order to build a global list at startup, put the required list there or build.startup=true.
  • In 6.x the operator array field in the assignment record became obsolete. The groups the operator is a member of are stored in the operator record.

Sunday, March 6, 2011

تغيير كلمة سر منسية لمدير النظام

لدي جهاز افتراضي وندوز 2003 يعمل كمتحكم بالنطاق domain controller وأردت ان اجرب عليه بعض الدروس،ولكن فوجئت اني نسيت كلمة السر. بالبحث في جوجل وجدت الحل وأردت مشاركته لعل احد الاخوة يحتاج هذه الطريقة ربما في ظرف اكثر خطورة كقيام هاكر او موظف مفصول بتغيير كلمة السر. الحل هو استخدام برنامج يعمل كخدمة وهذا البرنامج يقوم بتشغيل الامر

Saturday, February 5, 2011

CSVDE

اذا أردت حفظ بيانات المستخدمين في اكتف دايركتوري بصيغة ملف نصي يمكنك استخدام الامر csvde أو ldifde
صيغة الأمر كالتالي:
1- لحفظ كافة المستخدمين في واحد من organizational units وليكن اسمه MS في ملف باسم ms.csv
csvde -d “ou=ms,dc=arabtech,dc=com” -f ms.csv
حيث arabtech.com هو اسم الدومين

كيفية استخدام iText لتعديل ملفات pdf

مكتبة iText من افضل المكتبات للتعامل برمجيا مع ملفات pdf. وهناك نسخة منها لأغلب لغات البرمجة مثل iTextSharp للغة C#.
لتعديل حقل معين كالاسم الاول في فورم بملف pdf باستخدام جافا:

كيفية نسخ ملف في جافا

حتى جافا 6 لا توجد دالة واحدة لنسخ الملفات. لنسخ الملف عليك قراءته في وسيط تخزين buffer ثم اعادة كتابته

تغيير اسم مستخدم عن طريق جافا

حاليا اعمل على برنامج لادارة الهوية Oracle Identity Manager وكان مطلوبا تغيير اسم المستخدم في اكتف دايركتورى وعندما حاولت التغيير بالطرية المعتادة فوجئت بالخطأ canot_on_rdn. سبب الخطأ أن اسم المستخدم أو خاصية cn في الاكتف دايركتوري هي خاصية مميزة للمستخدم relative distinguished name RDN ولا يمكن تعديلها كباقي الخصائص الحل هو اعادة تسمية المستخدم كالتالي:

HP SM7 notes

Hello
I’ve worked on HP Service Manager 7 for awhile and since I’m moving to Oracle products, I thought why not post some of my notes. Hope they would be useful to someone.
• To indicate a ticket is active, the “flag” column is set to “TRUE”
• pfduplicate($file0,$file) makes a copy of $file before saving eg contact.name in $file0 ~=contact.name in $file

HP OVSM 7 notes 2

• Macrodef contains all macro definitions and can change setting to run macro before or after saving
• Insert(array,position,no. of times, what to insert)
• Macromail1: query: recipient, names:message, string1:subject
• Macropage1: query:recipient,text:page
• $lo.ufname = operator()

انشاء تقرير في كرستال ريبورت باستخدام الاجراءات المخزنة

اذا احتجت لانشاء تقرير في كرستال ريبورت وهذا التقرير يحتوي على بيانات قليلة فغالبا لن تواجهك مشكلة في الآداء، ولكن ماذا لو كانت الشبكة بطيئة بين الخادم الذي يتم عليه انتاج التقرير وبين قاعدة البيانات؟

اخطار مسؤول النظام عند حدوث خطأ

يتطلب المشروع الذي اعمل عليه حاليا ان نقوم بارسال ايميل لمدير النظام عند تسجيل خطأ في البرنامج، وبما أن البرنامج يقوم بالتسجيل في event log وجدت ان الحل الابسط هو استخدام مكتبة EventLogEntry تحت System.Diagnostics. يقوم البرنامج بالبحث عن اي خطأ مصدره البرنامج وارسال ايميل لتنبيه مدير النظام.

Delete OIM users from database

If you ever needed to physically delete OIM users from the database, you can try the following script.لإhe following script will delete all users except for the three default accounts created during installation.Please note that it was tested on OIM 9.1.0.1. You may need to modify it if OIM is in a different version level:

البحث عن قيمة في كل جداول اوراكل

في احد البرامج اردت معرفة الجدول الذي يحوي اسماء المدن، هذا البرنامج يستعمل schema اسمها HOU، هناك طرق بسيطة في برامج مثل TOAD او بتشغيل AUDIT ولكن اذا اردت البحث بطريقة اخرى يمكنك تجربة التالي:

استخراج بيانات المستخدمين من اكتف دايركتوري

هذا السكربت يقوم باستخراج خصائص المستخدمين من اكتف دايركتوري ويوجد مثله الكثير على الانترنت ولكن الخاصية المميزة له هو قدرته على استخراج المجموعات التي ينتمي لها المستخدم

CA eTrust SSO user list

تطلب المشروع الذي أعمل به حاليا استخراج بيانات المستخدمين من قاعدة بيانات  CA eTrust SSO. لذلك قمت بكتابة الكود التالي الذي يقوم بعمل الاتصال عن طريق LDAP باستخدام ADO.

OIM Child Table manipulation

We have built a staging system to process the user requests before forwarding them to OIM. With this system, users may choose to add/remove a user from an AD group. After the staging system validates the request according to business rules, it generates a flat file with the following format:
Action(Add/Remove)*User name*AD Group Name.

Close reconciliation events in OIM

Sometimes you need to programmatically close reconciliation events such as if you enabled “sequence recon” in the resource object. I was also required to send a notification to the administrator to alert him is a trusted source reconciliation event failed to process.

قراءة ملف نصي لتحديث بيانات مستخدمي OIM

لقراءة ملف من اجل تحديث مستخدمي OIM قمت بكتابة الكود التالي لتنفيذ scheduled task بها خاصية attribute لتحديد اسم الملف.

الملف به اسم المستخدم ورقم الهاتف (على هيئة رقم من جزئين بينهما فاصلة).

حذف OIM disabled users



لحذف disabled users بعد عدد معين من الايام استخدم الكود التالي في scheduled task والتي بها خاصية لتحديد عدد الايام التي يتم المسح بعدها.