In Window enviroment, registry play a role to store setting and so forth. To know more please find out more yourself. So today I here to write on how to adding, editing and delete the Window registry by using reg file. Registry is arranged in a hierarchy tree view. So to edit or adding the registry value, you may need to ensure the path of the registry is correct point to the particular path. Let see example below you may know.
To delete
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Cisco Systems\VPN Client]
"test"=-
To Add
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Cisco Systems\VPN Client]
"test"="123"
To Update
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Cisco Systems\VPN Client]
"test"="456"
Copy the registry and save it as reg file, once the file execute and the value will change accordingly.
Wednesday, December 9, 2015
Thursday, October 8, 2015
Group Policy Enforcement for NTP
As per last few post I did write about setup a NTP server on Ubuntu. So now here I going to write about consuming the NTP service in Window environment with the use of Group policy.
Step 1
Click "Start," type "gpedit.msc" into the search box, press "Enter" and select "Group Policy Editor" from the list of results.
Step 2
Double-click "Computer Configuration | Administrative Template | System | Windows Time Service|Time Provider"
After click on "Time Provider", from the right pane there are few option for you to do the configuration. So you may enable the NTP and configure the parameters for the NTP.
Step 3
Select "Enabled" to respond to time synchronization queries; click "Disabled" to ignore requests.
Step 4
Configure the group policy object accordingly.
Step 5
Verify the policy is working by gpupdate /force in client PC and do a reboot. Then locate the registry and look for the value is change accordingly.
HKLM\SYSTEM\CurrentControlSet\services\W32Time\Parameters
Step 1
Click "Start," type "gpedit.msc" into the search box, press "Enter" and select "Group Policy Editor" from the list of results.
Step 2
Double-click "Computer Configuration | Administrative Template | System | Windows Time Service|Time Provider"
After click on "Time Provider", from the right pane there are few option for you to do the configuration. So you may enable the NTP and configure the parameters for the NTP.
Step 3
Select "Enabled" to respond to time synchronization queries; click "Disabled" to ignore requests.
Step 4
Configure the group policy object accordingly.
Step 5
Verify the policy is working by gpupdate /force in client PC and do a reboot. Then locate the registry and look for the value is change accordingly.
HKLM\SYSTEM\CurrentControlSet\services\W32Time\Parameters
Wednesday, September 30, 2015
Setup Printer Server in Window Enviroment
Recently company performing upgrading the printer due to the contract of leasing is end. So i have these opportunities to re-setup the entire print server and all the printer in the company. But here I to record down the very small request that requested by end user in my company.
So before you setup print server, you need few parameters in order to make sure the installation is going smooth.
- A server with complete setup and with fix ip.
- IP addresses for printer.
- AD server IP address or name for user authentication.
- SMTP server name or IP and account for scan to email (may vary to different setup)
- And the printer driver.
The request of the end user always very strange and picky. So have to really do a lot of home work.
When the user is printing, he/she dun not want to see the notification appear as they consider it is an interference for them. So to disable the notification during printing, you have go to Device and Printers (You can locate this in control panel too). At the top of the device and printer window, at the top bar there is a menu with the name of Printer server properties. As shown at below picture.
While for Window XP you may locate it On the File menu, click Server Properties.
Then another small window menu will pop up and go to last tab to the menu. You will see there is a check box with the description. Select the setting as you wish and save it.To disable the notification when printing, uncheck Show informational notification for network printers. Please take note that the menu may vary according to the printer driver.
Monday, September 28, 2015
Setup NTP Server in Ubuntu
In order to ensure the LAN client all time is same and reduce the network usage, you may implement a local NTP server rather than each of the PC in LAN get update from internet.
If you are using terminal only you can use date command to check the system date time.
So here we going to install NTP server.
As usual after install the ntp server, we may proceed with doing the configuration by using the below configuration to do the change.
After change the conf, please do not forget to save it. To ensure the change is made, you may verify it by using command below to check the performance or summary of the NTP server.
After change the ntp server in the ntp.conf file, you have to remember to reload the file or restart the service in order to apply the change.
You may reload the service by command below.
If you are using terminal only you can use date command to check the system date time.
So here we going to install NTP server.
sudo apt-get install ntp
As usual after install the ntp server, we may proceed with doing the configuration by using the below configuration to do the change.
sudo nano /etc/ntp.confAfter open up the ntp.conf file with nano, you will see some show as below. Here is the list of NTP server that you get update from it. So by default is Ubuntu server, if you wish to change the NTP server as your preference you may delete and change it to your preferred server.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for # more information. server 0.ubuntu.pool.ntp.org server 1.ubuntu.pool.ntp.org server 2.ubuntu.pool.ntp.org server 3.ubuntu.pool.ntp.org
After change the conf, please do not forget to save it. To ensure the change is made, you may verify it by using command below to check the performance or summary of the NTP server.
sudo ntpq -pHere is an example output after assign the command.
# sudo ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== +stratum2-2.NTP. 129.70.130.70 2 u 5 64 377 68.461 -44.274 110.334 +ntp2.m-online.n 212.18.1.106 2 u 5 64 377 54.629 -27.318 78.882 *145.253.66.170 .DCFa. 1 u 10 64 377 83.607 -30.159 68.343 +stratum2-3.NTP. 129.70.130.70 2 u 5 64 357 68.795 -68.168 104.612 +europium.canoni 193.79.237.14 2 u 63 64 337 81.534 -67.968 92.792
After change the ntp server in the ntp.conf file, you have to remember to reload the file or restart the service in order to apply the change.
You may reload the service by command below.
sudo service ntp reloador you can restart the service as command below.
sudo service ntp restartStop the service by using command below.
sudo service ntp stopStart the service by using command below.
sudo service ntp start
Saturday, September 26, 2015
Install FTP Server on Ubuntu
Here we go to install the very secure FTP on Ubuntu.
Once you open up the conf file with nano, you may see all the configuration available in this file and all the configuration name is identical. Change the setting as you need. For an example, the most important thing is to restrict the anonymous access we disable it. In the vsftpd.conf look for below parameters and change YES to NO.
So now you may able to transfer file using your favorite FTP software. For me I am using WinSCP for a reason that it is really light weight.
sudo apt-get install vsftpdAfter finish install vsftpd, you may think of change the configuration for the application.
sudo nano /etc/vsftpd.conf
Once you open up the conf file with nano, you may see all the configuration available in this file and all the configuration name is identical. Change the setting as you need. For an example, the most important thing is to restrict the anonymous access we disable it. In the vsftpd.conf look for below parameters and change YES to NO.
anonymous_enable=NO
So now you may able to transfer file using your favorite FTP software. For me I am using WinSCP for a reason that it is really light weight.
Friday, September 25, 2015
Unable to Update & Install via apt-get command
When trying to update or install software on Ubuntu server, below message if display as unable to fetch the source. There are few possibility where the mirror server is unreachable, outdated, or the host unable to be resolve. In my case is the host name is unable to resolve.
Once you think of host name unable to resolve, then the DNS is play important roles in this case. So here we go to configure the DNS.
So we going to use the Google DNS, key in the parameters as below.
Save and exit the file then try to update the Ubuntu server again.
.......
Err http://extras.ubuntu.com precise Release.gpg
Unable to connect to extras.ubuntu.com:http:
Err http://security.ubuntu.com precise-security InRelease
Err http://security.ubuntu.com precise-security Release.gpg
Unable to connect to security.ubuntu.com:http: [IP: 91.189.92.190 80]
Reading package lists... Done
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/InRelease
......
Once you think of host name unable to resolve, then the DNS is play important roles in this case. So here we go to configure the DNS.
sudo nano /etc/resolvconf/resolv.conf.d
So we going to use the Google DNS, key in the parameters as below.
nameserver 8.8.8.8
nameserver 8.8.4.4
Save and exit the file then try to update the Ubuntu server again.
sudoapt-get update
Tuesday, September 15, 2015
SharePoint People Picker
There is a quite new control for me in development in SharePoint which is people editor and i usually name is as people picker. Below is how the people picker look like.
Below is the front end code for people editor.
<SharePoint:PeopleEditor
AllowEmpty="true"
ValidatorEnabled="true"
ID="peEngineer" Width="250px"
runat="server" MultiSelect="false"
ShowCreateButtonInActiveDirectoryAccountCreationMode="false"
SelectionSet="User" />
Below is the code behind for get the user name from
//for SharePoint people picker
ArrayList resolvedEntities = peEngineer.ResolvedEntities;
SPUser engineer = null;
string engineerName = string.Empty;
foreach (PickerEntity entity in resolvedEntities)
{
engineer = SharePointUtil.GetCurrentSharepoinSite().RootWeb.EnsureUser(entity.Key);
engineerName = engineer.LoginName;
}
After you get the name from the AD, now show how to bind the value to the people picker. You may trigger any action such as button click or page load to run below code so that able to bind data into the people picker.
peEngineer.CommaSeparatedAccounts = "i:0#.w|contoso\testid";
cs
Subscribe to:
Posts (Atom)