SUDO in HP UX : A small presentation

Here i am going to give a small presentation about the SUDO.

1.Whats's the need for SUDO?
2.How to install SUDO ?
3.How to Configuring SUDO?
4.Alias in SUDO


1.host_alias
2.user_alias
3.runas_alias
4.command_alias


A.Whats's the need for SUDO :

1.SUDO helps an administrator to protect root passwd and at the same time allowing specific users to execute command as root without supplying root.
2.Users and commands can be defined in sudo configuration file /etc/sudoers.
3.Sudo access can be monitored by /var/adm/sudolog (Default path).


B. Installation of SUDO :

After downloading source code distribution you would need to compile sudo program for a particular machine.

# gunzip sudo-1.6.6.tar.gz
# sudo-1.6.6.tar
# tar xvf sudo-1.6.6.tar

Once you have uncompressed and untarred we may proceed with Installation process.

Step 1 : You need to configure Makefile for your system.

This can be done by running configure command under /usr/local/sudo-1.6.6
#cd /usr/local/sudo-1.6.6
# ./configure
#Configuring Sudo version 1.6.6

Step 2 : Now we are ready with customised Makefile for your system.

We can now compile the sudo program on the system.

#cd /usr/local/sudo-1.6.6

#make

Note: make command is located in /usr/bin/make on most systems

We are now ready with complied file for your system and this file need to be installed before we configure sudo.

#make install


C. Configuring SUDO :

After you install sudo successfully on target system you can start configuring SUDO.

you would find file sudoers under /etc after installation

/etc/sudoers.

This is the file where you specify users and commands for the sudo program.
visudo

you may find 4 major Alias
1.host_alias
2.user_alias
3.runas_alias
4.command_alias


User Alias :
========

User alias is a list that can contain any combination of usernames, UID (with # prefix), system group( with a % prefix), netgroups (+ perfix) and other user user-defined alias.

Eg) This may look like below in sudoers file.

# User alias specification
User_Alias DBSPIUSR = ffwdpm,ffwppm,ffwnpm,ffwfpm,ffwjpm

Runas Alias :
=========

A Runas_Alias can contain any of the same elements as the User_Alias; the only difference is that you use Runas_Alias instead of User_Alias in the configuration. The Runas_Alias allows execution of a command as a user other than root.


Host Alias
=======

A Host_Alias is a list of hostnames, IP addresses, or netgroups (with a "+" prefix). The Host_Alias also supports the NOT operator, "!", to negate an entry. You will need to use the fully qualified DNS name if the hostname command on any machine returns the name of the machine in a fully qualified DNS format. The visudo editor will not catch this "error."

Command Alias
============

A Cmnd_Alias is list of one or more commands specified by a full pathname, not just the filename. You can also specify directories and other aliases to commands

Eg)
# Cmnd alias specification
Cmnd_Alias      WEBSTART=/etc/rc3.d/S91cats.web.server
Cmnd_Alias      WEBSTOP=/etc/rc3.d/K91cats.web.server

Cmnd_Alias      SUORACLE = /bin/su - oracle,\
                                        /bin/su oracle,\
                                        /usr/bin/su - oracle,\
                                        /usr/bin/su oracle

Veritas volume manager - Quick referrence



Veritas Volume Manager Quick Reference

Disk Commands

Operation
Command
Example
Initialize disk
vxdisksetup
vxdisksetup -i c1t9d0
Uninitialize disks
vxdiskunsetup
vxdiskunsetup -C c1t9d0
List disks
vxdisk list

List disk header
vxdisk list
vxdisk list disk01
List disk private region
vxprivutil list
vxprivutil list /dev/rdsk/c1t9d0s2
Reserve a disk
vxedit set
vxedit -g my-dg set reserve=on my-disk
Rename a disk
vxedit rename
vxedit -g my-dg rename my-disk new-disk
Rescan all disks
vxdctl enable

Disk Group Commands

Operation
Command
Example
Create disk group
vxdg init
vxdg init my-dg disk01=c1t9d0
Remove disk group
vxdg destroy
vxdg destroy my-dg
Add disk
vxdg adddisk
vxdg -g my-dg adddisk disk02=c1t8d0
Remove disk
vxdg rmdisk
vxdg -g my-dg rmdisk disk02
Import diskgroup
vxdg import
vxdg import my-dg
Deport diskgroup
vxdg deport
vxdg deport my-dg
List diskgroups
vxdg list
vxdg -o alldgs -e list
List free space
vxdg free
vxdg -g my-dg free
List total free space
vxassist
vxassist -g my-dg maxsize layout=concat
Rename diskgroup on deport
vxdg deport
vxdg -n new-dg deport old-dg
Rename diskgroup on import
vxdg import
vxdg -n new-dg import old-dg
Evacuate data from a disk
vxevac
vxevac -g my-dg fromdisk todisk(s)

Plex Commands

Operation
Command
Example
Create a plex
vxmake plex
vxmake -g my-dg plex my-plex sd=my-sd
Associate a plex
vxplex att
vxplex -g my-dg att my-vol my-plex
Dis-associate a plex
vxplex dis
vxplex -g my-dg dis my-plex
Attach a plex
vxplex att
vxplex -g my-dg att my-vol my-plex
Detach a plex
vxplex det
vxplex -g my-dg det my-plex
List plexes
vxprint
vxprint -lp
Remove a plex
vxedit
vxedit -g my-dg rm my-plex

Subdisk Commands

Operation
Command
Example
Create a subdisk
vxmake sd
vxmake -g my-dg my-sd disk1,1,5000
Remove subdisk
vxedit rm
vxedit -g my-dg rm my-sd
Display subdisk info
vxprint -st

Associate subdisk to plex
vxsd assoc
vxsd -g my-dg assoc my-plex my-sd
Disassociate subdisk
vxsd dis
vxsd -g my-dg dis my-sd

Volume Commands

Operation
Command
Example
Create a volume
vxassist make
vxassist -g my-dg make my-vol 1G
vxassist make my-vol 1G layout=stripe
Delete a volume
vxedit rm
vxedit -g my-dg -r rm my-vol
Display volume info
vxprint -vt
vxprint -g my-dg -vt
Display volume info
vxinfo
vxinfo -g my-dg my-vol
Resize a volume
vxassist growto
vxassist growby
vxassist -g my-dg growto my-vol 2G
vxassist -g my-dg growby my-vol 600M
Start a volume
vxvol start
vxvol -g my-dg start my-vol
Stop a volume
vxvol stop
vxvol -g my-dg stop my-vol
Initialise a volume
vxvol init active
vxvol -g my-dg init active my-vol
Recover a volume
vxrecover
vxrecover -g my-dg my-vol
Mirror a volume
vxassist mirror
vxassist -g my-dg mirror my-vol
Add log to a volume
vxassist addlog
vxassist -g my-dg addlog my-vol
Snapshot a volume
vxassist snapstart
vxassist snapshot
vxassist -g my-dg snapstart my-vol
vxassist -g my-dg snapshot my-vol my-snap
Change volume layout
vxassist relayout
vxassist -g my-dg relayout my-vol layout=stripe
Convert volume type
vxassist convert
vxassist -g my-dg convert my-vol layout=stripe-mirror
Estimate max volume size
vxassist maxsize
vxassist maxgrow
vxassist -g my-dg maxsize layout=... disk1 diskn
vxassist -g my-dg maxgrow my-vol
Remove a volume
vxassist remove
vxassist -g my-dg remove my-vol
Remove a volume
vxvol stop
vxedit -r rm
vxdg rmdisk
vxvol -g my-dg stop my-vol
vxedit -g my-dg -r rm my-vol
vxdg -g my-dg rmdisk my-disk
Help on layout
vxassist help
vxassist help layout

Multipathing Commands

Operation
Command
Example
Display enclusres
vxdmpadm listenclosure
vxdmpadm listenclosure all
Display controllers
vxdmpadm listctlr
vxdmpadm listctlr all
Display subpaths
vxdmpadm getsubpaths
vxdmpadm getsubpaths ctlr=c3
vxdmpadm getsubpaths dmpnodename=EMC_CLARiiON2_4

Miscellaneous Commands

Operation
Command
Example
Enable Enclosure Based Naming
vxddladm set namingscheme
vxddladm set namingscheme=ebn
Disable Enclosure Based Naming
vxddladm set namingscheme
vxddladm set namingscheme=obn



Firmware version in HP UX server : How to check??

In PA-RISC server

1. Use the below command 

  #cat /var/tombstone*

2.Login to MP console and go to the command menu and run the below command

  # sysrev

In Integrity servers

1. Run the below command 
    #machinfo

2. We can check through console also using sysrev command.


In Next post we can see how to upgrade Firmware for HP UX servers....


Security in HP UX : User Level Security

The default security configuration file in HP-UX is /etc/default/security

To prevent users from loggin in:

 01. Modify NOLOGIN variable in /etc/default/security to 1 (NOLOGIN=1)
 02. Create /etc/nologin file with the text you want to display the users.

To make the HP-UX system to use /etc/shadow file to store ecrypted password instead of /etc/passwd

 # pwconv


To switch to standard password mode from shadow mode

 # pwunconv

To list all the failed login attempts

 # lastb

To force the user "user1" to change his password during next login;

 # passwd -f user1

Format of /etc/shadow

 loginname:password:lastchange:mindays:maxdays:warndays:inactivity:expiration:reserved

Some files related to logged in users

 /var/adm/wtmps  ## all the successful logins. Access using last command
 /var/adm/btmps  ## all the bad login info. Access using lastb
 /var/adm/utpms  ## has the list of currently logged in users. Access using who command.


The security attributes description file, /etc/security.dsc, lists the attributes that can be defined either in /etc/default/security, in the user database in /var/adm/userdb, or in both files. Some attributes are configurable and some are internal.


To display all attributes for user "user1"

 # userdbget -u user1

To identiy and repair the problems in User database

 # userdbck

To check the status of local user accounts

 # userstat -a

Secure FTP in HP Ux : How to Setup ??

1. Download and install the latest OpenSSH software from software.hp.com

2.Create a user called "user1" and setup password for that user

3. Make sure that user is able to login to the system using his password

4. Make the user to sftponly user by running the following command. Follow the instructions.

    # /opt/ssh/utils/ssh_chroot_setup.sh

5. The above command will create the necessary ftp directory structure. If /ftproot was selected as the root directory for the user, then all the /usr, /etc, /dev, /bin directory structure and the required commands like ls, cd, mv, etc.. are copied to the directory structure created.

6. Copy /opt/ssh/utils/sftponly to /bin and /ftproot/bin directory

    # cp /opt/ssh/utils/sftponly
    # cp /opt/ssh/utils/sftponly /ftproot/bin/sftponly

7. Add /bin/sftponly entry to /etc/shells file

    # echo "/bin/sftponly" >> /etc/shells

8. Modify the user1's home directory and shell in /etc/password as follows.

    user1:x:1000:1000:chrooted user:/ftproot/./home/user1:/bin/sftponly 

9. Make sure the user1 home directory is created if not already created

    # mkdir -p /ftproot/home/user1
    # chown user1 ftproot/home/user1

10. Now, the user is jailed within /ftproot directory. Also, user1 can not login to the system using ssh since his shell is set as /bin/sftponly.

Operating System not found” : How to fix this error in windows XP ?


Prerequisite : Set the primary boot device as CD/DVD drive in the BIOS.

1. Now let the installation disc to prompt for action. Press “R” in your keyboard.

2. This should take you to the WIndows Recovery mode. If you are asked for the password provide the Administrator password.

3. Now you should see C:\WINDOWS> in the command prompt. If you are eager to know what is the fix just type ‘help’ (without quotes) and try to trace what will be the next step.

4. Just give “fixboot” at the prompt. C:\WINDOWS>fixboot. Press enter.Give yes if you are asked confirmation.

5. Next C:\WINDOWS>fixmbr. Press enter.Give yes if you are asked confirmation.

These two commands will fix the Master Boot Record of the partition in case of any errors.

Cluster node configuration methods

 These are the available clustering node configurations

1. Active/Active – Traffic is directed to another existing node or balanced across all other nodes

2. Active/Passive – A complete new node is served when primary node fails

3.  N+1 – Serving a complete new node in the place of primary node and the new node    in the cluster must be capable of handling any services which the primary node handled with/without any special additional software.

4. N+M – Here more than one dedicated nodes are served for handling failovers.
This   may require high cost and maintenance.

5. N-to-1 – Here the backup node is serving temporarily until the primary node is brought back online. Then the running services are transferred to primary node.

6. N-to-N — A combination of Active/Active and N+M clusters, N to N clusters.

Enable or disable the Legacy Naming Model : How to ??

To disable the Legacy naming model of disk drives 

#rmsf -L
To enable the legacy naming model

 # insf -L

To find out which legacy DSF does /dev/rdisk/disk17 map?

 # ioscan -m dsf /dev/rdisk/disk17
 Persistent DSF           Legacy DSF(s)

 /dev/rdisk/disk17        /dev/rdsk/c6t0d0
                          /dev/rdsk/c5t0d0
                          /dev/rdsk/c7t0d0
                          /dev/rdsk/c8t0d0

To which persistent DSF does /dev/rdsk/c5t2d4 map?

 # ioscan -m dsf /dev/rdsk/c6t0d0
 Persistent DSF           Legacy DSF(s)

 /dev/rdisk/disk17        /dev/rdsk/c6t0d0



Migration from Legacy VG


vgdsf is a script to migrate a LVM volume group from legacy to agile naming model.

 # vgdsf

 USAGE: vgdsf {-a | -d | -c} vg_name
   -a - Add persistent DSFs to the volume group
   -d - Delete legacy DSFs from the volume group
   -c - Convert legacy DSFs to persistent DSFs (-a and -d)in the volume group

Load balance policy change in HP UX : How to ??

1. Identify the disk:

# ioscan -mdsf /dev/rdisk/disk69
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk69        /dev/rdsk/c7t2d4                
                         /dev/rdsk/c5t2d4

2.Use the scsimgr utility to check the load balancing policy:

# scsimgr get_attr -D /dev/rdisk/disk69 -a load_bal_policy       

 SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk69
name = load_bal_policy
current = least_cmd_load  <---------------------  Exisiting Policy
default = least_cmd_load saved =

3.To change the load balancing policy, use:

# scsimgr set_attr -D /dev/rdisk/disk69 -a load_bal_policy=round_robin

Value of attribute load_bal_policy set successfully

Valid options are:

    * least_cmd_load
      Directs I/O requests through the hardware path with the least outstanding I/O requests.
    * round_robin
      Cycles I/O requests through the available hardware paths in round robin fashion.
    * cl_round_robin
      Cycles I/O requests through the available hardware paths in round robin fashion, within the locality of the CPU on which the I/O was initiated. This is known as cell-aware round robin.
    * weighted_rr
      Cycles I/O requests through the available hardware paths in round robin fashion, subject to a user-assigned weight for each path. A hardware path is used until the number of I/O requests matches its weight , and then another path is chosen.
    * preferred_path
      Directs I/O requests to the specified hardware path, if available.
    * pref_tport
      Directs I/O requests to the specified target port, if available.
    * closest_path
      Directs I/O requests through the hardware path with the lowest memory access latency, based on its affinity with the CPU processing the I/O operation.
    * path_lockdown
      Directs I/O requests through a single hardware path. The chosen hardware path is the one that is least loaded when the device is opened. This algorithm is the only one supported for serial devices such as tape drives, changers, and SCSI controller devices, and does not apply to block devices such as disks.

Configure paging file in Windows server - using command : How to ?

At a command prompt, type:

#wmic pagefileset where name=”<path/filename>” set InitialSize=<initialsize>,MaximumSize=<maxsize>


Where:

path/filename is the path to and name of the paging file

initialsize is the starting size of the paging file in megabytes.

maxsize is the maximum size of the page file in megabytes.

create a volume in VXVM : commands

To display free space in the system

#vxdg free

To display free space for a disk group

#vxdg -g diskgroup free

To display general information for all subdisks

#vxprint -st

To display complete information about a particular subdisk

#vxprint -l subdisk_name (ex disk01)

Creating Volumes
=================


To create a new volume by entering:

#vxassist make volume_name length

(Examble :  vxassist make vol1 4000m)

To create a new volume in a particular subdisk

# vxassist make volume_name length subdisk

(Examble:  vxassist make vol1 4000m disk04)

to create a 30 megabyte striped volume on three specific disks (disk03, disk04, and disk05), enter:
vxassist make agni 4000m layout=stripe disk03 disk04 disk05


Now create a file systems in it and mount and change /etc/fstab

#newfs -F vxfs -o largefiles /dev/vx/rdsk/newvol
# mkdir /new
#mount /dev/vx/dsk/newvol /new

VXVM setup in HP UX : How to ??

1. Run vxinstall to initialize at least one disk in rootdg.

#vxinstall

2. Then  run vxdiskadm to add other disks

#vxdiskadm

3. Create a /etc/vx/disks.exclude file if you want some disks to be excluded from vxvm

4. The files /etc/vx/cntrls.exclude and /etc/vx/disks.exclude are for the controllers and disks which will be  

    excluded to be used by vxinstall or vxdiskadm so the disks under that controllers or the sepcified disks

    will not be included to any Disk Group. But all the other commmands will work

5. To determine whether the volume daemon is enabled, use the following
    command:

  # vxdctl mode


6. To enable the volume daemon, use the following command:
   
  #vxdctl enable


7. To start the vxconfigd daemon, use the following command:
  
  #vxconfigd

8. Verify that vxiod daemons are running by entering this command:
   
  #vxiod

9. If no vxiod daemons are currently running, start some by entering this
    command:

  # vxiod set 10

    where 10 can be substituted by the desired number of vxiod daemons. It is recommended that at least one

   # vxiod daemon exist for each CPU in the system.

Initial Setup

1. Place disks under Volume Manager control.
2. Create new disk groups (if you do not want to use rootdg or you want other disk groups).
3. Create volumes.
4. Put file systems in volumes.

DNS server setup in HP UX : How to ??

setup Primary DNS Server :

1. Get your IP numbers for Primary and Secondary DNS first.

2. Create a list of host names and correspondence IP addresses in /etc/hosts file

3. #mkdir /etc/named.data

4. #cd /etc/named.data

5. Create a file named param that will be used by hosts_to_named to create DNS data files
Ex. -d bootabc.com
-n 192.168.18
-z 192.168.18.15
-b /etc/named.boot
-s
(-d = domain name, -n = network number, -z = configuration file for secondary server and IP no. of
primary server to download data files, -b for boot files used by named process, -s adds a name server
(NS) resource record in configuration file.

6. #hosts_to_named –f param

7. download the db.cache file from internet copy it to /etc/named.data directory

8. Modify /etc/rc.config.d/namesvrs file (NAMED=1) to start named process automatically with m/c
boots

#vi /etc/rc.config.d/namesvrs

NAMED=1

then sav and exit

9. #/sbin/init.d/named start


Create Secondary DNS Server

1. #mkdir /etc/named.data

2. copy boot.sec file as /etc/named.boot from the primary server if you don’t have much disk space.
or
copy boot.sec.save file as /etc/named.boot if you have much space to keep database file.


3. copy db.127.0.0 from the primary server to /etc/named.data directory

4. copy db.cache from the primary server to the /etc/named.data directory

5. if you want to create local database files download the remaining files from /etc/named.data from
primary server to local /etc/named.data directory.

6. update the /etc/rc.config.d/namesvrs file to start named at boot time.

#vi /etc/rc.config.d/namesvrs

NAMED=1

then sav and exit

7. start named using /sbin/init.d/named start


Create Caching DNS Server

1. #mkdir /etc/named.data
2. copy named.cacheonly from primary sever as /etc/named.boot
3. copy db.127.0.0 from primary server to /etc/named.data directory
4. copy db.cache from primary server to /etc/named.data directory
5. update the /etc/rc.config.d/namesvrs file to start named at boot time
6. start named /sbin/init.d/named start command

Redhat cluster manager components : Quick View.

Software SubsystemComponentPurpose
FencefencedProvides fencing infrastructure for specific hardware platforms.
DLMlibdlm, dlm-kernelContains distributed lock management (DLM) library.
CMANcmanContains the Cluster Manager (CMAN), which is used for managing cluster membership, messaging and notification.
GFS and related locksLock_NoLockContains shared filesystem support that can be mounted on multiple nodes concurrently.
GULMgulmContains the GULM lock management user-space tools and libraries (an alternative to using CMAN and DLM).
Rgmanagerclurgmgrd, clustatManages cluster services and resources.
CCSccsd, ccs_test and ccs_toolContains the cluster configuration services dæmon (ccsd) and associated files.
Cluster Configuration ToolSystem-config-clusterContains the Cluster Configuration Tool, used to configure the cluster and display the current status of the nodes, resources, fencing agents and cluster services graphically.
Magmamagma and magma-pluginsContains an interface library for cluster lock management and required plugins.
IDDEViddevContains the libraries used to identify the filesystem (or volume manager) in which a device is formatted.

Unattended installation of windows XP : How to ??

Creating Answer File

  • Create a new folder and rename it with deploys tools
  • Insert the Windows XP Professional CD in the CD-ROM drive.
  • If the Welcome To Microsoft Windows XP screen is displayed automatically, click Exit to close that screen.
  • Now go on my computers select CD drive and choose open options from right clicks
locate the \Support\Tools\ Deploy.cab files on the Windows XP Professional CD-ROM
deploy tools
Copy this file and paste it in deploy tools folder created in first steps
Now right click on it and select extract all options
extract deploy tools
Delete all other files expect Setupmgr.exe
Double click on Setupmgr.exe
setup.mgr
Windows XP Professional starts the Windows Setup Manager Wizard. Click Next.
Select Create A New Answer File options and then click Next
Select Windows Unattended Installation and then click Next
Select Windows XP Professional and then click Next
Select Fully Automated, and then click Next
Select No, This Answer File Will Be Used To Install From A CD, and then click Next
Select I Accept The Terms Of The License Agreement, and then click Next
Type your name in the Name box and your organization in the Organization box, and then click Next
Leave the default settings on the Display Settings page, and then click Next
Select the appropriate time zone, and then click Next
Type in the appropriate product key and Click Next
In the Computer Name text box, type a name for the computer, and then click Add. Repeat this step to add additional computers to the installation and Click Next.
Gives Administrator Password In Answer File, and then click Next
Select Typical Settings and Click Next
Select Workgroup and Click Next
Leave default setting and click next
Leave default setting and click next
Leave default setting and click next
Leave default setting and click next
Leave default setting and click next
Leave default setting and click next
Leave Blank and click next
Leave Blank and click next
Leave Blank and click next
Give the location of desktop and click next
In our next step we will learn how to make windows XP pro unattended CD from this answer files.

Disable service guard in HP UX : How to ??

If for some reason you want to disable Serviceguard on a system, you can do so by commenting out the following entries in /etc/inetd.conf:

#vi /etc/inetd.conf

hacl-cfg dgram udp wait root /usr/lbin/cmclconfd cmclconfd -p
hacl-cfg stream tcp nowait root /usr/lbin/cmclconfd cmclconfd -c

Then save and exit. And then run the below command

#/usr/sbin/inetd -c       #force inetd to re-read inetd.conf

Then diable the auto start for cluster service also

#Vi /etc/rc.config.d/cmcluster

AUTOSTART_CMCLD = 0

#cmquerycl -n <nodename>  #If the command fails, you have successfully disabled SG

Restoring Exchange 2007 - step by step procedure

Restoring Exchange 2007 - step by step
  1. Exchange Management ConsoleLaunch the Exchange Management Console by navigating to Start > All programs > Microsoft Exchange Server 2007 > Exchange Management Console.
  2. Expand Server Configuration from the left pane and select Mailbox.
  3. Right-click each database listed in the middle pane individually and select Dismount Database.






    Mailbox Database Properties
  4. Once the databases have been dismounted, right-click each database individually and select Properties and then check This database can be overwritten by a restore.











  5. BackupAssist restoreLaunch BackupAssist and click Restore in the navigation bar.






  6. Click Imaging engine restore. Windows Server Backup will then launch.
  7. Imaging engine restoreClick Recover under the Actions pane.







  8. Once the Recovery Wizard has launched, select "This server", and then click Next.
  9. Select date of backupSelect the date from the calendar and the time from the drop-down list of the backup you want to restore from. If you are recovering from this computer and the backup you select is stored on a removable media drive, you will be prompted to insert the relevant media.
    Then click Next.





  10. When asked what you would like to recover, choose the option for Applications, and click Next.
  11. Exchange recovery wizardUnder Applications, highlight "Exchange", and then click Next.








  12. Under Recovery destination, select Original location, and then click Next.
  13. Review the details, and click Recover to restore your Exchange Server.
  14. You can then view the status of the recovery operation and whether or not it was successfully completed.
  15. Mount mailbox databasesOnce recovery operation completes successfully, return to the Exchange Management Console (step 1) and mount each of the restored databases by right-clicking each one individually and selecting Mount Database.

Limitations of Windows Server Backup

Limitations of Windows Server Backup

As with most things that come built-into the operating system, there are limitations in what's built into Windows. Most notably, the monitoring and reporting side is extremely weak, and there are also several gaping holes in terms of hardware support.
Monitoring and reporting
  • No concept of media rotation strategies
  • The wizards do not show
  • No such thing as emailing the backup status report
  • No way to automatically see what versions of backups are available on the backup device
  • The drive letter is removed from backup devices
  • No centralized monitoring ability for monitoring large numbers of servers
Hardware support
  • Cannot set up automated backups to rdx and REV drives using the Microsoft wizards
  • Cannot set up automated backups to NAS using the Microsoft wizards
Selection of items to backup
  • Can only select entire volumes to backup, not individual files and folders
  • Can only select local volumes to backup, not network shares

Configure pagin file in Windows server - using command : How to ?

At a command prompt, type:

#wmic pagefileset where name=”<path/filename>” set InitialSize=<initialsize>,MaximumSize=<maxsize>


Where:

path/filename is the path to and name of the paging file

initialsize is the starting size of the paging file in megabytes.

maxsize is the maximum size of the page file in megabytes.

Configure proxy server using netsh in windows : How to??

You can use commands in the netsh winhttp context to configure proxy and tracing settings for Windows HTTP. The Netsh commands for winhttp can be run manually at the netsh prompt or in scripts and batch files.

To run these commands from the command prompt, you must either enter the netsh winhttp context or prepend the context to the command. For example, if you are at the command prompt but have not typed netsh and then winhttp to enter the netsh winhttp context, you must type:

netsh winhttp command

Where command is the command that you want to run, including all of the required parameters for the command.

# set proxy
# set tracing
# show proxy
# show tracing

set proxy

Configures the WinHTTP proxy setting.
Syntax

set proxy [proxy-server=] ProxyServerName [bypass-list=] <HostsList>
Parameters

Proxy-Server
    Required. Specifies the proxy server to use for http, secure http (https), or both http and https protocols.

Bypass-list
    Optional. Specifies a list of Web sites that should be visited without utilizing the proxy server. Use "<local>" to bypass all short name hosts.


set tracing

Configures the WinHTTP tracing parameters.
Syntax

set tracing [output=] file | debugger | both [trace-file-prefix=] FilePrefix [level=] default | verbose [format=] ansi | hex [max-trace-file-size=] FileSize [state=] enabled |disabled

show proxy

Displays the current WinHTTP proxy setting.

setup NAT using iptables in Linux : How to ??

Step #1. Add 2 Network cards to the Linux server

Step #2. Verify the Network cards, Whether they installed properly or not

ls /etc/sysconfig/network-scripts/ifcfg-eth* | wc -l

    ( The output should be "2")

Step #3. Configure eth0 for Internet with a Public ( IP External network or Internet)

cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
BROADCAST=xx.xx.xx.255    # Optional Entry
HWADDR=00:50:BA:88:72:D4    # Optional Entry
IPADDR=xx.xx.xx.xx
NETMASK=255.255.255.0    # Provided by the ISP
NETWORK=xx.xx.xx.0       # Optional
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=xx.xx.xx.1    # Provided by the ISP

Step #4. Configure eth1 for LAN with a Private IP (Internal private network)

cat /etc/sysconfig/network-scripts/ifcfg-eth1

BOOTPROTO=none
PEERDNS=yes
HWADDR=00:50:8B:CF:9C:05    # Optional
TYPE=Ethernet
IPV6INIT=no
DEVICE=eth1
NETMASK=255.255.0.0        # Specify based on your requirement
BROADCAST=""
IPADDR=192.168.2.1        # Gateway of the LAN
NETWORK=192.168.0.0        # Optional
USERCTL=no
ONBOOT=yes

Step #5. Host Configuration    (Optional)

cat /etc/hosts

    127.0.0.1       nat localhost.localdomain   localhost

Step #6. Gateway Configuration

cat /etc/sysconfig/network

    NETWORKING=yes
    HOSTNAME=nat
    GATEWAY=xx.xx.xx.1


Step #7. DNS Configuration


cat /etc/resolv.conf

    nameserver 203.145.184.13      # Primary DNS Server provided by the ISP
    nameserver 202.56.250.5        # Secondary DNS Server provided by the ISP

Step #8. NAT configuration with IP Tables

    # Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated.

iptables --flush            # Flush all the rules in filter and nat tables

iptables --table nat --flush

iptables --delete-chain

# Delete all chains that are not in default filter and nat table

iptables --table nat --delete-chain

# Set up IP FORWARDing and Masquerading

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

iptables --append FORWARD --in-interface eth1 -j ACCEPT

# Enables packet forwarding by kernel

echo 1 > /proc/sys/net/ipv4/ip_forward

 #Apply the configuration

service iptables restart

Step #9. Test the config

 # Ping the Gateway of the network from client system

ping 192.168.2.1

Try it on your client systems

ping yahoo.com
Blogger Tips and TricksLatest Tips And TricksBlogger Tricks