How to manually extend the evaluation period for Windows Server 2008

When the initial 60 or 180 days evaluation period nears its end, you can run the Slmgr.vbs script to reset the evaluation period. To do this, follow these steps:

   1. Login As a Administrator. Click Start, and then click Command Prompt.
   2. Type slmgr.vbs -dli, and then press ENTER to check the current status of your evaluation period.
   3. To reset the evaluation period, type slmgr.vbs –rearm, and then press ENTER.
   4. Restart the computer.
   5. Open Computer Properties.  Right Click on Computer ==> Click Properties ==>At Windows Activation 
       Screen ==>  Click on Activate ==> Click on Activate online ==> Click Next to finish actiavation.

This resets the evaluation period to 60 or 180 as per your last evaluation period.

how to get entire system information in ubuntu

facter : It is a tool to collect and display facts about the current system. The library behind Facter is easy to expand, making Facter an easy way to collect information about a system from within the shell or within Ruby.
#apt-get install facter
#facter and press enter to get the system details
Below is the output of facter
# facter
architecture => i386
facterversion => 1.5.4
hardwareisa => unknown
hardwaremodel => i686
hostname => my-desktop
id => root
interfaces => eth0
ipaddress => 192.168.xxx.xxx
ipaddress_eth0 => 192.168.xxx.xxx
kernel => Linux
kernelrelease => 2.6.31-22-generic-pae
kernelversion => 2.6.31
lsbdistcodename => karmic
lsbdistdescription => Ubuntu 9.10
lsbdistid => Ubuntu
lsbdistrelease => 9.10
lsbmajdistrelease => 9
macaddress => 00:16:ec:da:bc:21
macaddress_eth0 => 00:16:ec:da:bc:21
manufacturer => HP Pavilion 061
memoryfree => 1.28 GB
memorysize => 1.90 GB
netmask => 255.255.255.0
netmask_eth0 => 255.255.255.0
network_eth0 => 192.xxx.xxx.0
operatingsystem => Ubuntu
operatingsystemrelease => 9.10
physicalprocessorcount => 1
processor0 => Intel(R) Pentium(R) D CPU 2.80GHz
processor1 => Intel(R) Pentium(R) D CPU 2.80GHz
processorcount => 2
productname => RC562AA-ACJ a1514in
ps => ps -ef
rubysitedir => /usr/local/lib/site_ruby/1.8
rubyversion => 1.8.7
serialnumber => INI6370L08 AP640
sshdsakey => AAAAB3NzaC1kc3MAAACBAOBuTdUYuMv2b3xqIhWVpuRQunyIm6T5xOYqlZbwuBTi66oZwWTfE5rywsUHQL8CExMaofWFxlo3c+mTcxWIL+68ZjY5NZy5irwAl3g/CL4THtHmDCMbCmvdQLZeePElvYNFcmvC+7o3CbZWC2KU2FnzTCuI9vpG1k51OSiZJtdHAAAAFQDUId/oRXYQ281bZ9J42Wrt3VsbgQAAAIEAn74omuvo4qKjr1PE12HZSA2oeqpFajcGctEyxurQXzpLgjWcgs1ip2phjz6kypDIbELG/nvOComWIABADwnBnErwM0uDpchOkghzCFgR7Hk10Ph1/SQ4Si0y8jKZ9VzPxYzhZp0ekpL15QIutJSTbCG7WzlGRl3eHrY0cVgZVs4AAACABl/PgIPo0u8L2jI0R5wpUql1Tb0Ln+LTMt1HZoqR2gb7dmvI3FvNRbJfEMOy8f5YXeELQz1ppwRS8PpAas3Dh+Deg9dVSzKUTZURqOe4X8TWjrhf3I6jn00zvIjmGk0XhB5ueH3uoQsjogL/uRws1Tqk1wxF/xvt25t8jV1WATQ=
sshrsakey => AAAAB3NzaC1yc2EAAAABIwAAAQEAy6l8d9gOYGQ9CHQoQBmoJ74NDnSZBreIXD/nsAwj93i7pCv9LJ1ifybP7am7kJq3qaHhoU3sB8oaTUUfeXMXGfoHrwRvcIdYFdDKQ7KvjpZU7jWSsKECk0aibaVzqni5sixquLXcjte18T7DU1ki/K/sQPvSQII2Y9EWOAzdzoov4ezj30uer6sR6BkXSR5LK3LW+qoRPKT+xIQMBseJ9TZ8Tz7hpiz1AmcmPNhLj61aK0/1bbRBKzfr8bd8kkI3vkHvfE5Sqzu4VplSCNxa9QNG9jNFCdN/cGCYlL7GdWPNdBP3jzFXeLNgH+bTA82FrBqFaQo5bUOBSSCKFZyuaQ==
swapfree => 5.58 GB
swapsize => 5.58 GB
timezone => IST
type => Desktop
uniqueid => 007f0101
uptime => 4 days
uptime_days => 4
uptime_hours => 109
uptime_seconds => 395539
virtual => physical

sc (service control) command to start/stop any service in windows

SC (service control) command, allows u a lot more options than just start & stop a service
DESCRIPTION:SC is a command line program used for communicating with the NT Service Controller and services.
USAGE: sc  [command] [service name]  ...
Ex: sc query dhcpserver
      sc start dhcpserver
Note:We should know the Service name of any windows service.
Further help on commands can be obtained by typing: "sc [command]"
Commands:
        query-----------Queries the status for a service, or enumerates the status for types of  services.
        queryex---------Queries the extended status for a service, or enumerates the status for types of service.
        start-----------Starts a service.
        pause-----------Sends a PAUSE control request to a service.
        interrogate-----Sends an INTERROGATE control request to a service.
        continue--------Sends a CONTINUE control request to a service.
        stop------------Sends a STOP request to a service.
        config----------Changes the configuration of a service (persistant).
        description-----Changes the description of a service.
        failure---------Changes the actions taken by a service upon failure.
        qc--------------Queries the configuration information for a service.
        qdescription----Queries the description for a service.
        qfailure--------Queries the actions taken by a service upon failure.
        delete----------Deletes a service (from the registry).
        create----------Creates a service. (adds it to the registry).
        control---------Sends a control to a service.
        sdshow----------Displays a service's security descriptor.
        sdset-----------Sets a service's security descriptor.
        GetDisplayName--Gets the DisplayName for a service.
        GetKeyName------Gets the ServiceKeyName for a service.
        EnumDepend------Enumerates Service Dependencies.


useradd in ubuntu

The useradd command will let you add a new user easily from the command line:
#useradd username
Ex : useradd user1
This command adds the user, but without any extra options your user won’t have a password or a home directory. You can use the -d option to set the home directory for the user. The -m option will force useradd to create the home directory.
We will try creating a user account with those options, and then use the passwd command to set the password for the account. You can alternatively set a password using -p on the useradd command, but I prefer to set the password using passwd.
#useradd -d /home/user1 -m user1
#passwd user1
Important locations for users
    * /etc/passwd - User account information.
    * /etc/shadow - Secure user account information such as password.
    * /etc/group - Group account information.
    * /etc/default/useradd - Default values for account creation.
    * /etc/skel/ - Directory containing default files.
    * /etc/login.defs - Shadow password suite configuration.

mount windows shared folder from ubuntu

Two methods, depending on share host cifs or smbfs
smbfs is the "original" method.However, smbfs is not compatible with security signatures, which are enabled by default and
not recommended to disable on Windows Server 2003 and later. If a share is served by Windows Server 2003 or later, you should use cifs.
The "smbfs" package provides the tools needed to mount "smbfs" and "cifs" filesytems. You may have smbfs installed on your machine. If not, run

#sudo apt-get install smbfs
Mount Windows Shared folder with windows authentication
#mkdir -p /opt/win-share
#mount -t cifs //192.168.155.xxx/tools/ /opt/win-share/ --verbose -o username=administrator  #this will prompt for administrator password
#mount -t cifs //192.168.155.xxx/tools/ /opt/win-share/ --verbose -o username=administrator,password=****
Mount Windows Shared folder without authentication
#touch win-share-pass
#vi win-share-pass       #open win-share-pass and add below lines on it
username=administrator  #we can specify a user name to access the shared folder
password=********
Save the file

mount -t cifs //192.168.155.117/tools/ /opt/win-share/ --verbose -o credentials=/home/user/win-share-pass

Useful commands for Windows

Type below commands and press Enter in the command prompt  in Window


net view : Display information about the domains, computers, or resources that are shared by the specified computer, including the offline client caching settings.
net share : Create, delete, manage, and display shared resources.
net file : View and control resources that are shared on the network. The Server service must be running for you to use this command.
net config : View the maximum number of users who can access a shared resource and the maximum open files per session.

how to mount ISO on Ununtu

Mount iso in Ubuntu
mount -o loop -t iso9660 /path/to/iso/file.iso /media/cdrom
umount /media/cdrom or umount -f /media/cdrom