Tuesday, 12 February 2019

Menukar Resolution Screen Kedua Windows 10

Saya menghadapi masalah apabila cuba menukar resolution kepada screen kedua saya semasa mengunakan Window 10. Ia tidak semudah Windows 7 dan Windows-Windows yang lain yang saya gunakan. Link ini telah memberikan saya idea untuk menyelesaikan masalah ini.





Terima Kasih

Wednesday, 12 April 2017

How To Change Product Windows Product Key

1. Click Start, and then click Run.
2. In the Open box, type the following command, and then click OK.
                    %systemroot%\system32\oobe\msoobe.exe /a
3. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
4. Click Change Product key.
5. Type the new product key in the New key boxes, and then click Update.
    If you are returned to the previous window, click Remind me later, and then restart the computer.
6. Repeat steps 1 and 2 to verify that Windows is activated. You receive the following message:
Windows is already activated. Click OK to exit.
7. Click OK.

Monday, 10 April 2017

Transfer The Schema Master

1. Open the Active Directory Scheme Snap-In
2. In the console tree, right click Active Directory Schema and Click Change Active Directory Domain Controller.
3. In the change directory server dialog box, under the change to, click This Domain Controller of DS LDS instance.
4. In the list of domain controllers, click the name of domain controllers to which you want to transfer the schema master role and then click OK.

Reason Why Email Duplication in Our Outlook

I am working with company with multiple branch office in Malaysia. Sometimes we got report from users, that their email duplicate or receiveing same email a few times.

There are several reason why this issue occur and a few of it is:
             1)  Outlook failed to update email server that email has been download. Normally it's due to network interuption. Cause, the email will be dowloaded for the secon times. We need to let users know, for every email, please let download complely. However, if it is not beyond our controll, we need to ignore or delete the unnesessary.
              2) Senders face error on thier end.
                  If we findout, same person delivered same email to us, but others are not, it's posiblity the senders outlook has a problem. Most probably because of the PST file cannot grow or insufficient storage.



Thursday, 28 January 2016

Downgrade Domain Controller Functional Level


1. Import the AD module
                      Import-Module -Name ActiveDirectory

2. Check the Forest Functional level of your Active Directory
                      Get-ADForest | Format-Table Name , ForestMode  

3. Lower the Forest Functional Level and then the Domain Functional Level
                      Set-ADForestMode –Identity “ansarsoft.com” –ForestMode Windows2008Forest 
                      Set-ADDomainMode –Identity “ansarsoft.com” –DomainMode Windows2008Domain

4. To Confirm your Forest Functional level of your Active Directory
                      Get-ADForest | Format-Table Name , ForestMode

Monday, 11 January 2016

Samba 4, BTRFS (Volume Shadow Copy), Ubuntu

Download Ubuntu Server :
         http://www.ubuntu.com/download/server

Download Latest Stable Version Samba 4.
         https://download.samba.org/pub/samba/stable/

Start Install/Configure Ubuntu Server
         Configure server as per normal installation. In my virtual environment, I have created 2 virtual harddisk. 1 for file system, and the other 1 as keeping data.
         Root (/) and swap, I have configure on the first hard disk with  root ext4 format.
          The second disk, I have configured as btrfs format with mount mount /home. Acatually, we can configure this partition later, but to make it easy, I configure it as is.


smb.conf configuration

[sharename]
path = /home/data/location
        read only = No
        vfs objects = shadow_copy2
        shadow:format = @GMT-%Y.%m.%d-%H.%M.%S
        shadow:sort = desc
        shadow:snapdir = .snapshots


btrfs subvolume snapshot -r /home/data/location/ /home/data/location/.snapshots/@GMT-`date +%Y.%m.%d-%H.%M.%S` 


Reference :
https://btrfs.wiki.kernel.org/index.php/FAQ
http://forums.openmediavault.org/index.php/Thread/7331-GUIDE-Windows-Previous-Versions-and-Samba-Btrfs-Atomic-COW-Volume-Shadow-Copy/
https://www.howtoforge.com/a-beginners-guide-to-btrfs

Monday, 30 November 2015

Tape Command

Listing Data:
  • tar -tzf /dev/st0

Check Status:
  • mt -f /dev/st0 status 

Copy/Backup Data to Tape Drive:
  • tar -czf /dev/st0 /folder

Erase All Data:
  • mt -f /dev/st0 erase

Eject Tape :
  • mt -f /dev/st0 eject 

Monday, 4 May 2015

Update TimeZone On Unix


The localtime setting is store in the file /etc/localtime

1. Backup the existing Local Time setting
          # mv /etc/localtime /etc/localtime.bak
2. The directory for others Local Time  /usr/share/zoneinfo. We need to do the soft link to this location. eg. Kuala Lumpur Time Zone.
          # ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime
3. Check the current date by typing command :
          # date
          Tue May  5 10:40:51 MYT 2015

Friday, 17 April 2015

Install Samba 4 in Centos



Samba 4.
Install Samba 4 in Centos 7
Install Required Software
1.       yum install libacl-devel
2.       yum install e2fsprogs-devel
3.       yum install gnutls-devel
4.       yum install readline-devel
5.       yum install python-devel
6.       yum install gdb
7.       yum install gcc
8.       yum install gcc-c++
9.       yum install cups-devel
10.   yum install pam-devel
11.   yum install ctdb-devel
12.   yum install openldap-devel
13.   yum install libsmbclient
14.   yum install libacl-devel
15.   yum install libblkid-devel
16.   yum install gnutls-devel
17.   yum install readline-devel
18.   yum install python-devel
19.   yum install gdb
20.   yum install pkgconfig
21.   yum install krb5-workstation
22.   yum install zlib-devel
23.   yum install setroubleshoot-server
24.   yum install setroubleshoot-plugins
25.   yum install policycoreutils-python
26.   yum install popt-devel
27.   yum install libpcap-devel
28.   yum install sqlite-devel
29.   yum install libidn-devel
30.   yum install libsemanage-python
31.   yum install setools-libs-python
32.   yum install setools-libs
33.   yum install libxml2-devel
34.   yum install libacl-devel
35.   yum install libsepol-devel
36.   yum install libattr-devel
37.   yum install keyutils-libs-devel
38.   yum install cyrus-sasl-devel



Download and Install Samba

1.       Download Installer




2.       Extract the the compresed installer

    -    tar zxvf samba-4.0.0.tar.gz

3.       Go to the extract directory ant run installer

    -    ./configure  --enable-old-ctdb
4.       Run make
    -    make
5.       Run make install
    -    make install





Create the startup script (Auto start service)

1.       Create the script

     a.       # vi /etc/init.d/samba

    


#! /bin/bash
#
# samba4 Bring up/down samba4 service
#
# chkconfig: - 90 10
# description: Activates/Deactivates all samba4 interfaces
# configured to start at boot time.
#
### BEGIN INIT INFO
# Provides:
# Should-Start:
# Short-Description: Bring up/down samba4
# Description: Bring up/down samba4
### END INIT INFO
# Source function library.
. /etc/init.d/functions
if [ -f /etc/sysconfig/samba4 ]; then
. /etc/sysconfig/samba4
fi
CWD=$(pwd)
prog="samba4"
start() {
# Attach irda device
echo -n $"Starting $prog: "
/usr/local/samba/sbin/samba
sleep 2
if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi
echo
}
stop() {
# Stop service.
echo -n $"Shutting down $prog: "
killall samba
sleep 2
if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi
echo
}
status() {
/usr/local/samba/sbin/samba --show-build
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status irattach
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit 0

 



1.       Give the ownership
-    # chmod 755 /etc/init.d/samba
-    # chown root:root /etc/init.d/samba

To Provision Domain
-    # /usr/local/samba/bin/samba-tool domain provision



Configure Windows XP/7/8 to join domain
Install RSAT on this PC – You can manage active directory using this pc. The login name must be administtator.
Setup File Share
-    # mkdir /var/share
-    # vi /usr/local/samba/etc/smb.conf
[myshare]
path = /var/share
comment = The Share
read only = no
-