Tuesday, December 7, 2010

EyeOS in ubuntu 9.10 Step by Step

eyeOS is a kind of operating system which works online, i.e. it manages files on the server and enables the user to upload, download and edit files. We use a Debian 4.0 system for this demonstration purpose.

This tutorial shows the step by step installation and configuration of an eyeOS application which is hosted on your own server.
We need to install PHP and Apache as a basic requirement
#apt-get install apache2 libapache2-mod-php5
Download eyeOS file 
#wget http://sourceforge.net/projects/eyeos/files/eyeos/1.0.1/eyeOS_1.0.1.tar.gz/download
Unpack the file 
#tar-xzvf eyeOS_1.0.1.tar.gz
change the directory to eyeOS directory 
#cd eyeOS_1.0.1
copy the eyeOS files to /var/www folder 
#cp * /var/www
Change the present directory as www
#cd /var/www
change the files inside the directory 
#chmod 777 * 

The actual installation process is accounted for by a php script. We need to execute this in our webbrowser. To do this we navigate to the server or localhost, if you are sitting on the machine. You should see a placeholder page created by the Apache webserver to notify you that the installation worked. Now go into the subfolder eyeOS by appending it to the path in the address bar, and navigate to the file install.php, e.g. http://yourserver/install.php.
 Now a welcome screen will popup ,and it is easy to setup 

Monday, December 6, 2010

Webmin in Ubuntu 9.04

Webmin is a web-based interface for system administration for Unix. Using any browser that supports tables and forms (and Java for the File Manager module), you can setup user accounts, Apache, DNS, file sharing and so on.

Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules.





Installing Webmin in Ubuntu

 #apt-get update

 Installing the required packages

# sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

Downloading the package

# wget http://www.webmin.com/download/deb/webmin-current.deb


#apt-get -f install apt-show-versions

#dpkg -i webmin_1.530_all.deb
Restarting the application
#/etc/init.d/webmin restart

And it is done !!!!!!

You can access the webmin using the below URL

https://<Ipaddress>:10000

Please use the root user id and password to access webmin

Tuesday, November 30, 2010

Block IP based brousing in Squid

open squid.conf on any of the text editor
vim /etc/squid/squid.conf
and add te below lines to add an access list

acl ipacl url_regex http://[0-9]*/.[0-9]*/.[0-9]*/.[0-9]*
http_access deny ipacl
You need back slash before dot in the url_regex. otherwise all the URLs will
be blocked.

Wednesday, November 24, 2010

SSH or SCP without password

Scenario

You have two Linux servers and you want to ssh or you want to do scp(to copy some files to the other server)  without any password. This can be useful if you want to create a script to copy files from one server to another as backup

First  Linux server  :192.168.1.10
Second Linux Server  :192.168.1.11
install ssh on both of them
 #apt-get install ssh


In the First Server
1. Login as root
2. ls -al /root/
3. try to find a folder ".ssh"
4. if their is any files or folder other than 'known_hosts'   delete it by using following command
5. Now generate ssh keys, follow steps
6. ssh-keygen -t rsa
7.Don't give any passphrase -This is important
8. Press enter again & again untill you get command prompt again.
9.  Now you will find few files one of them will be "id_rsa.pub" in the .ssh folder
10. copy this file to the second  linux machine, follow steps
11. scp /root/.ssh/id_rsa.pub root@192.168.1.11:/root/
12. you will be asked for root password, type your password, press enter
13. now log on to 192.168.1.11 as root
14. type the sequence of following commands
15 .cd ~/.ssh
(. if it is their then follow the command sequence below, or create .ssh folder by typing following command  mkdir .ssh)
16. now add the key to your authorised keys, follow the steps
17. cat /root/id_rsa.pub >> /root/.ssh/authorized_keys --->> press enter
18. go back to your 192.168.1.10, type the following command
19. ssh root@192.168.1.11
20. you should be loged in to it without any password
21. repeate step 11 to 19 on all machines you want to logon without password

Monday, November 15, 2010

FSMO Best Practice

 By default, when you install the first DC of your forest root domain, this first DC holds all five FSMO roles. When you install the first DC of any other domain in your forest, that DC will hold all three domain FSMO roles (PDC Emulator, RID Master, and Infrastructure Master). Depending on the complexity of your network, however, this default roles assignment may not be appropriate, so you need to transfer some of your roles to a different machine to achieve optimal FSMO-role placement on your network

Rule 1: The PDC Emulator and RID Master roles should be on the same machine because the PDC Emulator is a large consumer of RIDs.

  • Tip: Since the PDC Emulator is the role that does the most work by far of any FSMO role, if the machine holding the PDC Emulator role is heavily utilized then move this role and the RID Master role to a different DC, preferable not a global catalog server (GC) since those are often heavily used also.

Rule 2: The Infrastructure Master should not be placed on a GC.

  • Tip: Make sure the Infrastructure Master has a GC in the same site as a direct replication partner.
  • Exception 1: It's OK to put the Infrastructure Master on a GC if your forest has only one domain.
  • Exception 2: It's OK to put the Infrastructure Master on a GC if every DC in your forest has the GC.

Rule 3: For simpler management, the Schema Master and Domain Naming Master can be on the same machine, which should also be a GC.

  • Exception: If you've raised your forest functional level to Windows Server 2003, the Domain Naming Master doesn't need to be on a GC, but it should at least be a direct replication partner with a GC in the same site
Referance :http://windowsdevcenter.com

Thursday, November 11, 2010

My kayako experience

Our company purchased Kayako ticketing system. Even though it is satisfying  minimum functionalities of a ticketing system, it showed a lot of un professional approach towards customer support

1) Even if you pay for the license ,they will not support you in installation .You have to pay for the installation and for the installation of the pre requisites ,separately .
2)For any minute change in the code , or any client specific change they will encourage their third party developers. If you purchase kayako you can get the below commends twice daily  "Jasvinder Singh: We apologize, we do not support code or template modifications." OR "Jasvinder Singh: You may seek assistance from our third party developers. Their information is available at :
  http://www.kayako.com/community/third-party-services.php "


I would like to add senareos which i recieve such comments .I am using V3 version ok kayako eSupport


1)If you have scenario where you have client users and a group of client users having a manager. And kayako  will generate email alert for client users but not to the managers. The managers have to rely on their browser based login panel to get each and every updates

#####################################
kayako never support email to the very first user in the CC list.
it means "the very first post of ticket is not send to the CC users",the second update onwards will send to all users in the CC list
If you want this functionality you have to contact any third party vendors.

Wednesday, October 27, 2010

Active directory Delete a Failed Domain

To clean up metadata
  1. At the command line, type Ntdsutil and press ENTER.
C:\WINDOWS>ntdsutil
ntdsutil:
  1. At the Ntdsutil: prompt, type metadata cleanup and press Enter.
ntdsutil: metadata cleanup
metadata cleanup:
  1. At the metadata cleanup: prompt, type connections and press Enter.
metadata cleanup: connections
server connections:
  1. At the server connections: prompt, type connect to server <servername>, where <servername> is the domain controller (any functional domain controller in the same domain) from which you plan to clean up the metadata of the failed domain controller. Press Enter.
server connections: connect to server server100
Binding to server100 ...
Connected to server100 using credentials of locally logged on user.
server connections:
Note: Windows Server 2003 Service Pack 1 eliminates the need for the above step.
  1. Type quit and press Enter to return you to the metadata cleanup: prompt.
server connections: q
metadata cleanup:
  1. Type select operation target and press Enter.
metadata cleanup: Select operation target
select operation target:
  1. Type list domains and press Enter. This lists all domains in the forest with a number associated with each.
select operation target: list domains
Found 1 domain(s)
0 - DC=dpetri,DC=net
select operation target:
  1. Type select domain <number>, where <number> is the number corresponding to the domain in which the failed server was located. Press Enter.
select operation target: Select domain 0
No current site
Domain - DC=dpetri,DC=net
No current server
No current Naming Context
select operation target:
  1. Type list sites and press Enter.
select operation target: List sites
Found 1 site(s)
0 - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
select operation target:
  1. Type select site <number>, where <number> refers to the number of the site in which the domain controller was a member. Press Enter.
select operation target: Select site 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
Domain - DC=dpetri,DC=net
No current server
No current Naming Context
select operation target:
  1. Type list servers in site and press Enter. This will list all servers in that site with a corresponding number.
select operation target: List servers in site
Found 2 server(s)
0 - CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
1 - CN=SERVER100,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
select operation target:
  1. Type select server <number> and press Enter, where <number> refers to the domain controller to be removed.
select operation target: Select server 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
Domain - DC=dpetri,DC=net
Server - CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
 DSA object - CN=NTDS Settings,CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
 DNS host name - server200.dpetri.net
 Computer object - CN=SERVER200,OU=Domain Controllers,DC=dpetri,DC=net
No current Naming Context
select operation target:
  1. Type quit and press Enter. The Metadata cleanup menu is displayed.
select operation target: q
metadata cleanup:
  1. Type remove selected server and press Enter.
You will receive a warning message. Read it, and if you agree, press Yes.

metadata cleanup: Remove selected server
"CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net" removed from server "server100"
metadata cleanup:
At this point, Active Directory confirms that the domain controller was removed successfully. If you receive an error that the object could not be found, Active Directory might have already removed from the domain controller.
  1. Type quit, and press Enter until you return to the command prompt.

See http://www.petri.co.il/delete_failed_dcs_from_ad.htm for more details

Thursday, October 21, 2010

Issues if FSMO roles are not functioning properly

If one or more FSMO roles are not functioning properly ,there may be a lot of issues in the Domain enviornment. Let me note down important ones  among them




  1. Domain Naming Master
    1. Can't add or remove a domain - Changes to the namespace need this role holder.
    2. Can't promote or demote a DC - Changes to the namespace need this role holder.
 
  1. Schema Master
    1. Can't modify the schema - Changes to the schema need this role holder.
    2. Can't raise the functional level for the forest - This role holder must be available when the raising the forest functional level. 
      3  PDC Emulator
      1. Users can't log on - If system clocks become unsynchronized, Kerberos may fail.
      2. Can't change passwords - Password changes need this role holder.
      3. Account lockout not working - Account lockout enforcement needs this role holder.
      4. Can't raise the functional level for a domain - This role holder must be available when the raising the domain functional level.
       4   RID Master
    1. Can't create new users or groups - RID pool has been depleted.
        5  Infrastructure Master
    1. Problems with universal group memberships - Cross-domain object references need this role holder.

Transfering FSMO roles


Transfering FSMO roles

Microsoft didn’t  impose any rule for  keeping all 5 FSMO roles on same or different servers, But for obtaining maximum performance ,they recommend some suggested configurations.While installing a domain controller using dcpromo ,the first domain controller will hold all the 5 FSMO roles ,later while installing the second DC onwards we can transfer FSMO roles from the current holder to other.
We may need to transfer FSMO roles while demoting any of the DCs . when the original FSMO role holder went offline or became non operational for a long period of time, then we may need to do Seizing of FSMO roles.
However the transfer process is not initiated automatically by the operating system, for example a server in a shut-down state.
ou can transfer FSMO roles by using the Ntdsutil.exe command-line utility or by using an MMC snap-in tool.
Transferring the RID Master, PDC Emulator, and Infrastructure Masters via GUI
To Transfer the Domain-Specific RID Master, PDC Emulator, and Infrastructure Master FSMO Roles:
  1. Open the Active Directory Users and Computers snap-in from the Administrative Tools folder.
  2. If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to Active Directory Users and Computers and press Connect to Domain Controller.
  3. Select the domain controller that will be the new role holder, the target, and press OK.
  4. Right-click the Active Directory Users and Computers icon again and press Operation Masters.
  5. Select the appropriate tab for the role you wish to transfer and press the Change button.
  6. Press OK to confirm the change.
  7. Press OK all the way out.
Transferring the Domain Naming Master via GUI
To Transfer the Domain Naming Master Role:
  1. Open the Active Directory Domains and Trusts snap-in from the Administrative Tools folder.
  2. If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to Active Directory Domains and Trusts and press Connect to Domain Controller.
  3. Select the domain controller that will be the new role holder and press OK.
  4. Right-click the Active Directory Domains and Trusts icon again and press Operation Masters.
  5. Press the Change button.
  6. Press OK to confirm the change.
  7. Press OK all the way out.
Transferring the Schema Master via GUI
To Transfer the Schema Master Role:
  1. Register the Schmmgmt.dll library by pressing Start > RUN and typing:
regsvr32 schmmgmt.dll
  1. Press OK. You should receive a success confirmation.
  2. From the Run command open an MMC Console by typing MMC.
  3. On the Console menu, press Add/Remove Snap-in.
  4. Press Add. Select Active Directory Schema.
  5. Press Add and press Close. Press OK.
  6. If you are NOT logged onto the target domain controller, in the snap-in, right-click the Active Directory Schema icon in the Console Root and press Change Domain Controller.
  7. Press Specify .... and type the name of the new role holder. Press OK.
  8. Right-click right-click the Active Directory Schema icon again and press Operation Masters.
  9. Press the Change button.
  10. Press OK all the way out.

Wednesday, October 20, 2010

How to seize FSMO Roles

How to seize FSMO Roles

Open the command prompt and type ntdsutil
Eg:
C:\WINDOWS>ntdsutil
ntdsutil:

Step 2
T ype roles, and then press ENTER.

Eg:
ntdsutil: roles
fsmo maintenance:

Step :3
Type connections, and then press ENTER.

Eg:
fsmo maintenance: connections
server connections:

Step:4
Type connect to server <servername>, where <servername> is the name of the server you
want to use,and then press ENTER.

Eg
server connections: connect to server yourserver
Binding to yourserver ...
Connected to yourserver using credentials of locally logged on user.
server connections:
Step:5
At the server connections: prompt, type q, and then press ENTER again.
Eg:
server connections: q
fsmo maintenance:
Step:6
Type seize <role>, where <role> is the role you want to seize. For example, to seize the RID Master role, you would type seize rid master:
Available options are 
Eg
fsmo maintenance: ?
 ?                              - Show this help information
 Connections                    - Connect to a specific AD DC/LDS instance
 Help                           - Show this help information
 Quit                           - Return to the prior menu
 Seize infrastructure master    - Overwrite infrastructure role on connected server
 Seize naming master            - Overwrite Naming Master role on connected server
 Seize PDC                      - Overwrite PDC role on connected server
 Seize RID master               - Overwrite RID role on connected server
 Seize schema master            - Overwrite schema role on connected server
 Select operation target        - Select sites, servers, domains, roles and naming contexts
 Transfer infrastructure master - Make connected server the infrastructure master
 Transfer naming master         - Make connected server the naming master
 Transfer PDC                   - Make connected server the PDC
 Transfer RID master            - Make connected server the RID master
 Transfer schema master         - Make connected server the schema master

Step:6
After the selection of FSMO role You will receive a warning window asking if you want to perform the seize. Click on Yes.
Step 7:
Repeat steps 5 and 6 until you've seized all the required FSMO roles.
Step 8:
After you seize or transfer the roles, type q, and then press ENTER until you quit the Ntdsutil tool.
Note: Do not put the Infrastructure Master (IM) role on the same domain controller as the Global Catalog server. If the Infrastructure Master runs on a GC server it will stop updating object information because it does not contain any references to objects that it does not hold. This is because a GC server holds a partial replica of every object in the forest.  

How to promote a Domain controller to Global Catalog server?

How to promote a Domain controller to Global Catalog server?
1)      Open Active Directory Sites and Services.and expand the sites
2)       Select required site and the server which needs to be promoted.
3)      On the right pane, right click NTDS Settings and select properties.
4)      There is a checkbox for Make this server a Global Catalog.  Check it to make the server a GC.

Note: It may take some time to build the role

How to check a domain is a Global Catalog Server

How to check a domain is Global Catalog Server?

1.)  Start Menu > Administrative Tools > Active Directory Sites and Services.
2.) In the left pane of the Sites Tree, find the name of your Active Directory server.
3.) Right-click the NTDS Settings for your Active Directory server and select  Properties. If the Global
Catalog check box is selected, the Active Directory server is configured to be a global catalog.
Command Line options
1. Open command prompt and type repadmin.exe /options * and use IS_GC for current domain options.
2. Open command prompt and   type nltest /dsgetdc:yourdomain /GC 
3.dsquery server –isgc    eg:dsquery server -domain yourdomain.com -isgc

Wednesday, October 13, 2010

How to Show hard disk size in Linux or UNIX


Show hard disk size in Linux or UNIX
$ df
will show File syste, Total space and free space user in percentage
$ df –H
Will show the same in MB and GB