Thursday, December 18, 2014

How to Create a bootable Windows 2012 R2 USB Disk? (applies to Windows 8.1 also)

Pre-requisites: 7-Zip software (Download it from here: http://7-zip.org/), Windows 2012 (R2) ISO (or Windows 8.1 ISO), 8GB or more USB disk
  • Open Command Prompt in elevated mode (Run as Administrator)
  • Type diskpart and press Enter
  • Type list disk and press Enter. Note the list of existing disks.
  • Insert the USB Disk
  • Type list disk and press enter again. Note the new disk showed up which is our USB disk. I assume the new disk is 2 for example purpose.
  • Type select disk X where X is your USB disk. E.g., select disk 2. Press Enter.
  • Type clean and press enter.
  • Type create partition primary and press enter to create primary partition 1.
  • Type select partition 1 and press enter.
  • Type active and press enter to make the partition 1 active
  • Type format fs=ntfs and press enter. This will format the partition 1 as NTFS volume.
  • Type assign and press enter to assign the USB disk to a drive letter.

  • Now right click on Windows Server 2012 R2 or Windows 8.1 ISO file, select 7-Zip –> Extract Files…
  • Select your USB disk to extract the ISO contents to the USB disk
That’s all. Boot the server or computer using the bootable USB disk.

How to logoff remote desktop sessions via command line tools?

Query the Remote Server for Current Terminal Sessions


To query and list the sessions on the remote session, you could use QUser.exe or QWinsta
1. QUser
QUser command comes with all the latest Windows clients and servers. This will list the sessions
of the remote server (or local machine).
NOTE: if you are using Windows XP, you need to add this location into your System path:
C:\WindowsSystem32DLLCache. To do this, in command prompt, type the following.
SET PATH = %PATH%;C:WindowsSystem32DLLCache;
QUser help shows,
C:\Anand>QUser /?
Display information about users logged on to the system.
QUERY USER [username | sessionname | sessionid] [/SERVER:servername]
username Identifies the username.
sessionname Identifies the session named sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
E.g.,
C:>quser /server:MyCitrixSVR
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
johndoe ica-tcp#966 10 Active 7 7/31/2008 3:04 PM
averagejoe ica-tcp#969 1 Active 9 7/31/2008 3:30 PM
familyman ica-tcp#984 5 Active 1:06 7/31/2008 4:33 PM
normaldude ica-tcp#987 2 Active 4 7/31/2008 6:20 PM


2. QWinsta
QWinsta is liLle different and beLer. It has more features and options. It comes with all flavors of
Windows. QWinsta command line help displays as,
C:>qwinsta /?
Display information about Terminal Sessions.
QUERY SESSION [sessionname | username | sessionid]
[/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]
sessionname Identifies the session named sessionname.
username Identifies the session with user username.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
/MODE Display current line seLings.
/FLOW Display current flow control seLings.
/CONNECT Display current connect seLings.
/COUNTER Display current Terminal Services counters information.
E.g.,
C:>qwinsta /server:citrixserver
SESSIONNAME USERNAME ID STATE TYPE DEVICE
0 Disc rdpwd
ica-tcp 65536 Listen wdica
rdp-tcp 65537 Listen rdpwd
console 16 Conn wdcon
ica-tcp#966 johndoe 10 Active wdica
ica-tcp#969 apple 1 Active wdica
ica-tcp#984 averagejoe 5 Active wdica
ica-tcp#987 familyman 2 Active wdica
ica-tcp#989 whoisme 3 Active wdica
You are welcome to try the other options QWinsta provides.


Logoff the Remote Sessions


To Log off the terminal session of the remote server, you can use any one of two command line
tools. One of LOGOFF and another one is RWINSTA. Before you log off the remote session, you
should know the ʺSession IDʺ which you get it from ʺQUSERʺ OR ʺQWINSTAʺ commands as
above stated.


1. Logoff
Logoff command kicks off (logging off) the specified remote session. Log off help shows,
C:>logoff /?
Terminates a session.
LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]
How to logoff remote desktop sessions via command line tools? | ..:::: … http://anandthearchitect.wordpress.com/2008/08/01/how-to-logoff-remo…
3 of 7 02/26/2013 05:20 PM
sessionname The name of the session.
sessionid The ID of the session.
/SERVER:servername Specifies the Terminal server containing the user
session to log off (default is current).
/V Displays information about the actions performed.
E.g.,
C:>logoff /server:infra-apps 1 /v
Logging off session ID 1


2. RWinsta
RWinsta has same parameters and does same thing as log off command. It simply means Reset
Windows STAtion. The help goes as,
C:>RWinsta /?
Reset the session subsytem hardware and soOware to known initial values.
RESET SESSION {sessionname | sessionid} [/SERVER:servername] [/V]
sessionname Identifies the session with name sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server containing the session (default is current).
/V Display additional information.
E.g.,
C:>RWinsta /Server:MyWinServer 1
Note: RWinsta command does not return anything.
Happy Re-seLing the remote sessions.

Tuesday, February 4, 2014

Set network configurations from the command line in Windows

Lets use the following criteria:

We will be setting up Local Are Connection

    IP        : 172.168.100.2
    MASK    : 255.255.255.0
    GW        : 172.168.100.1
    GW Metric    : 1

Here is the syntax for IPv4:

netsh interface show config
netsh interface ip set address name="Local Area Connection" static 172.168.100.2 255.255.255.0 172.168.100.1 gwmetric=1

Check for duplicate Security Identifiers (SID) on your domain

Open a command prompt and type

C:\ ntdsutil

 and press ENTER.

Now type

C:\ security account management

and press ENTER.

Now type

C:\ connect to server DNSNameOfSAMDatabaseServer

 and press ENTER.

Now type

C:\ check duplicate sid

and then press ENTER.

If you have duplicates it will be listed.

Wednesday, November 20, 2013

AN Authentication Error has occured (0X507)

This error occured when you try to connect from your XP (SP 2 or 3) or Vista desktop to Windows 2008 TS. This is NLA error. WIndows 2008 use NLA for security reason. 

To solve this error you need to make registory changes. 




1. Click on Start and Click on RUN (if it is Vista type regedit in search)
2. Type Regedit and click OK
3. It will open registory editor
4. Click on HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
5. In right hand panel right click on Security Packages and clcik Modify.
6. In box leave all value and add tspkg at end As new value. and click OK.Refer Image
7. Now click onHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders
8. In right hand side panel right click on Security Provider and click Modify
9. In data add word credssp.dll as new value. Do not change any other value
8. Click OK and exit from registery Editor
9. Restart your compute


If you are responsible for maintaining Windows Terminal Server in your environment then i strongly recommend to use "Windows Server 2008 Terminal Services Resource Kit" . This book is really very helpful.
  

Sunday, November 17, 2013

SEP 12.1 & Dos commands



We should be familiar with dos commands to start & stop services related to SEP.

Symantec Endpoint Protection Service is dependent on Symantec Web service so when we try to stop web service only it will stop SEPM service also.

Net stop semwebsrv

Type ‘Y’to stop the service, you can see it's stopping SEPM service first then Apache service.

To start both the services again type

Net start semsrv

IF you wish to stop only Symantec Endpoint Protection Manager Service only

Net stop semsrv

To start Symantec Endpoint Protection Manager service again

Net start semsrv

o stop Symantec Endpoint Embedded database service.

net stop sqlanys_sem5

To start it again

net start sqlanys_sem5

How to restart Shared insight cache service through command line if it’s installed.

Sc start “Shared insight cache”

Sc stops “Shared insight cache”

Sc query “Shared insight cache”



In many cases we may required to stop SEP client service to replace sylink.xml or for any other troubleshooting.

To stop SEP client service

smc -stop

After typing this command there won't be any command prompt window, SEP yellow shied icon  should disappear after typing this command.

To start SEP client service

smc -start



To disable SEP client firewall service

smc -disable –ntp

To enable client firewall service

smc -enable -ntp

If the SEP client UI is password protected:

smc -disable -ntp -p

I hope it's been informative.

Tuesday, November 12, 2013

Using a Command Line to Uninstall Software on Remote PCs

WMIC (Windows Management Instrumentation Command-Line) is a potent tool that often doesn't see much use due to the lack of (easily accessible) documentation available. More information can be found on WMIC here: http://technet.microsoft.com/en-us/library/bb742610.aspx. Some great switches and alternate options can be found here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic_overview.mspx. We’ll be using WMIC with domain admin credentials to crawl through a list of nodes (PCs/Laptops) and uninstall an example program without interrupting the user.

01. Load up a command shell with appropriate access permissions

Though a WMIC instruction can be given appropriate credentials prior to operation, it is typically best-practice to avoid clear-text typing the password (who is that looking over your shoulder;)). We’ll execute the runas command like the following:

Runas /user:DomainAdminAccount@DOMAIN cmd

… which will prompt us for the credentials of our DomainAdminAccount. If authenticated, we’ll be handed a command shell running as the Admin

 02.     
Verify Program Installation (an optional informative step)

With our WMIC prompt, we can ask many questions of a node (or nodes) and receive some nicely formatted replies. Though formatting the replies is beyond the scope of this "How To", much more information can be found on the internet.

So let's find out if a particular node even has our target software (Spiceworks does attempt to list this information in its software scan)

>/node:COMPUTERNAME product get name,version,vendor

This command asks WMI to reply with a list including the Name, Version, and Vendor of all compliant software installations.

If you would like to filter for a specific product, you may do so. Here's an example scanning a networked machine for all installed applications from the vendor "Apple, Inc"

>/node:ANOTHEREXAMPLE product where vendor="Apple Inc." get name,vendor

(*Note from Anders4221:
A small hint if you have special characters like '-' or '/' in the computer name you need to use ' ' characters in order to get information from client)

(**Note from Joe3034:
Here is how you use wildcards in your search:

Surround the like phrase in double quotes and your search criteria in single quotes, and use % as the wildcard symbol.

e.g.:
/node:ComputerXYZ product where "vendor like 'adobe%'" get name,version,identifyingNumber )

03. Call for the Uninstallation

So we can make a call to the WMI interface to uninstall a particular product... let's pick on the MobileMe Control Panel from our previous example. The command:

>/node:EXAMPLE product where name="MobileMe Control Panel" call uninstall

... will prompt you for confirmation in the following (long) format:

Execute (\\EXAMPLE\ROOT\CIMV2:Win32_Product.IdentifyingNumber="{6DA9102E-199F-43A0-A36B-6EF48081A658}",Name="MobileMe Control Panel",Version="2.1.0.24")->Uninstall() (Y/N/?)?

.. to which you must reply 'y' if you wish to uninstall. WMI compliant software will run the default uninstalation procedures without the user needing to do anything (they receive no prompts etc).

**Note that you may also use the
/nointeractive flag like /node:EXAMPLE product where name="MobileMe Control Panel" call uninstall /nointeractive to prevent the confirmation request!
-thx Bart2691

04. Call Uninstall for a List of Machines (an optional informative step)

Let's assume you just got word that Adobe Reader has a serious flaw in it's old version. In a panic, you asked all your users to blindly install the new version of Adobe reader straight from Adobe's site. Thankfully, they all managed to do so... however you've received 3 tickets so far about an Acrobat.com icon on the desktop.

You have a flat text file of all your computer's names stored in c:\computers.txt. You pop open a WMIC shell with appropriate permissions and enter the following command:

>/failfast:on /node:@"c:\computers.txt" product where name="Acrobat.com" call uninstall /nointeractive

Which iterates through your list, skipping nodes that are invalid (eg:machine is turned off) and those that don't meet the criteria. You'll need to confirm 'y' that you want to uninstall on every node unless you use the nointeractive flag.

* Updated Note from Bart2691
... an easy way to automate answering 'Yes'. Examples for doing it by PC or a text file is to use the /nointeractive flag. Additionally, if you don't wish to hang on failed nodes, use the /failfast:on flag to quickly skip a node that isn't responding.

** note from true911 (unconfirmed)
The correct flag is failfast:on, not fastfail:on

wmic /failfast:on /node:@"FILENAME.txt" product where "name like 'microsoft office professional edition 2003'" call uninstall /nointeractive

This for Spiceworks for this links.

Monday, November 4, 2013

Remove Leftover Office Registry Keys

Sometimes after uninstalling older versions of Microsoft Office some registry keys are left behind. This causes Spiceworks to think that those older versions of Office are still installed, even though the actual program files are all removed. You can follow the steps here to clean up those old registry keys so Spiceworks can get a proper inventory of the software on the machine.

NOTE: Please make a backup of Registry before making any changes to it. You can severely damage a machine if an incorrect edit is made.
1.Open up RegEdit

Open up RegEdit by going to Start>Run and typing "regedit" and pressing Enter or OK. You can also enter the "regedit" command into a Command Prompt to open up the editor.
   
2.Locate the Office Registry Key

Microsoft stores all of the installation information for Office Products in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\. Underneath this key you will see various version numbers, each corresponding to different versions of Office. They are as follows:


-9.0 is Office 2000
-10.0 is Office XP
-11.0 is Office 2003
-12.0 is Office 2007
-14.0 is Office 2010
   
Note : On a 64bit machine it is under HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Office.

3.Locate the Corresponding Registration Key

Underneath each of the version number keys you should see a "Registration" key. Depending on how many Office products you have installed (Visio, Project, etc. all will be stored underneath one of those version keys) on the machine there will be multiple hashed keys present underneath the Registration key. Each of these hashed keys should have a value underneath it called "ProductName". You can use this value to correctly determine which hashed key is related to the product you want to remove.

   
4.Delete the Hashed Key

Once you have located the correct hashed registry key, delete it. As mentioned above, though, make sure you have a good backup before doing this!
   
A9909880dbc69ec638645f89f4cec6ae617b50c5bcea4b4214d520def25bbef6_hashed_key_big
Conclusion

Once you have performed the steps above run a scan on the device by either running a full network scan or a rescan underneath the Tools section of the device. Once the scan is complete you should see that the long deleted Office products are now gone from your Spiceworks Inventory. If the scan is still showing that the software is present, you might need to disable Incremental Scanning in Settings>Network Scan.

I hope this helps!

This topic are taken from Spiceworks.

Saturday, November 2, 2013

Solved: “Cannot read from the source file or disk”

     One of our file shares ended up with several undelete-able files. Attempting to delete them results in “Error Deleting File or Folder – Cannot delete file: Cannot read from the source file or disk“.



Note: Windows 7′s version of this message is something like:

    Could not find this item: This is no longer located in C:\Blah. Verify the item’s location and try again.

Even going to the file’s properties to check permissions presented a very blank properties dialog. And a CHKDSK didn’t sort thing out either.

It turns out the problem was: the filename ended with a dot, e.g. it was something like “C:\Temp\Stuff\Sales Agreement.“. As far as Windows is concerned this is an invalid file name: so although it gets reported in a directory listing, the standard Windows APIs for manipulating files subsequently deny its existence.

So how did this file get created in the first place? The answer: a Mac. The file was on a file share which had been accessed by a Mac user. Macs tend to write all sorts of metadata to extra “._DSStore” files and suchlike and had left this file behind.

So if Windows doesn’t appear to allow these file names, how did they get to be created? Well, it turns out that NTFS allows all sort of file name/path weirdness that Windows, or specifically the Win32 API, doesn’t allow. For example, NTFS actually allows file paths up to 32K but Windows restricts file paths to no more than 260 characters (MAX_PATH). I suppose this is all for DOS/Windows 9x backwards compatibility. As these files were being accessed over a file share I guess the usual Win32 checks are bypassed.

But thankfully you can get Win32 to ignore these checks by prefixing your file paths with \\?\, (ie. C:\Temp\SomeFile.txt becomes \\?\C:\Temp\SomeFile.txt) which I discovered after reading this blog post about long paths in .NET.

So at a command prompt (Start > All Programs > Accessories > Command Prompt) I was able to delete the file using:

del "\\?\C:\Temp\Stuff\Sales Agreement."

    Note: On Windows 7 it seems you can just use wildcards without the \\?\ trick to delete the offending files: e.g.
    del c:\temp\somefil*

If it’s a folder/directory you’re trying to delete use the rd or rmdir command, e.g.:

rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder."

Tip: as you’re typing the file/directory name use the TAB key to auto-complete the name (press TAB repeatedly to cycle through possible names).


Of course the corollary of all of this is that you could really annoy somebody by doing this:



echo Hi > "\\?\%USERPROFILE%\Desktop\Annoying file you can't delete."

Monday, July 15, 2013

Essential Command-Line Tools for Managing Active Directory

Windows Server 2008 R2 includes several tools that let you manage Active Directory from the command line. Here’s a look at the key tools and what they do.

Adprep Prepares a Windows forest or domain for installation of Windows domain controllers (DCs). To prepare a forest or a domain, use adprep /forestprep and adprep /domainprep, respectively. (Note that for Windows Server 2003 SP1 or later, a domain’s Group Policy isn’t automatically updated. To prepare Group Policy for the domain, you must use the command adprep /domainprep /gpprep. This modifies the access control entries (ACEs) for all Group Policy object (GPO) folders in the SYSVOL directory to grant read access to all enterprise domain controllers. This level of access is required to support RSoP for site-based policy. Because this security change causes the NT File Replication Service (NTFRS) to resend all GPOs to all domain controllers, you should use adprep /domainprep /gpprep only after careful planning.)

Dsadd Adds computers, contacts, groups, organizational units, and users to Active Directory. Type dsadd objectname /? at a command prompt to display help information about using the command, such as dsadd computer /?.

Dsget Displays properties of computers, contacts, groups, organizational units, users, sites, subnets, and servers registered in Active Directory. Type dsget objectname /? at a command prompt to display help information about using the command, such as dsget subnet /?.

Dsmod Modifies properties of computers, contacts, groups, organizational units, users, and servers that exist in Active Directory. Type dsmod objectname /? at a command prompt to display help information about using the command, such as dsmod server /?.

Dsmove Moves a single object to a new location within a single domain or renames the object without moving it. Type dsmove /? at a command prompt to display help information about using the command.

Dsquery Uses search criteria to find computers, contacts, groups, organizational units, users, sites, subnets, and servers in Active Directory. Type dsquery /? at a command prompt to display help information about using the command.

Dsrm Removes objects from Active Directory. Type dsrm /? at a command prompt to display help information about using the command.

Ntdsutil Allows the user to view site, domain, and server information; manage operations masters; and perform database maintenance of Active Directory. Type ntdsutil /? at a command prompt to display help information about using the command.

Saturday, July 6, 2013

SQLa0000.tmp file rapidly increases

We have noticed recently that there is a temp file in C:\windows\temp called sqla0000.tmp (c:\windows\temp\sqla0000.tmp) that continuously grows over time until it completely fills the hard drive.  It seems that the file grows gradually and then on one day it balloons to fill the entire hard drive.

 This file is associated with Symantec Endpoint Manager as you need to stop the SEPM service to delete it.

I noticed that if I restart my Symantec Embedded Database service, the file shrinks tremendously. However, I have had to do this 2 times in the past 3 months.

qla000.tmp file is consuming hard drive space


http://www.symantec.com/business/support/index?page=content&id=TECH188303

Automatically Clean Up Temporary ASP.NET Files

The Problem

One of the test environments I help maintain is subject to dynamic and regular changes in .NET applications. The development team are constantly releasing new builds that are slightly different.
You may not be aware that .NET applications go through a compilation process when they first start up. I’ve also been told on application pool recycle however I haven’t confirmed this. However, after the application has been removed or updated, the compilation temporary files remain. On a test environment similar to my above scenario, a total of 50GB of disk space can be easily wasted, doing nothing. So if you’re in a similar scenario, you may need to routinely clean up these files.
I know of four locations where these files can build up:
  • C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework64\v1.1.4322\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
If you application pools run in 64bit mode, you’ll find the “Framework64″ locations more applicable. If your application pools use 32bit mode, you’ll need to consider the “Framework” locations.

A Few Notes

A reminder that files in these locations are normal. Don’t go over the top trying to clean them up.
It should be noted that while the files are in use by the web server, you will not be able to delete them – this is fine; the goal is to clean up unused files.
You should also be aware the next time the application fires up, on app pool start, the application will re-compile again. This may lead to a longer than average initial page load. If this is of concern, consider only removing files that are older than 30 days.
Of course, this script is provided as is. You should test it thoroughly in a test environment before use in production (though I certainly do).

Thursday, May 2, 2013

How to logoff remote desktop sessions via command line tools?

        In Windows servers, only two remote desktop sessions allowed with administrative access. There are situations, you can’t connect to the server via remote desktop because of two sessions already active.  You may have seen this dialog box. ("Remote Desktop Disconnected", "This computer can’t connect to the remote computer")

 
     Usually Windows Administrators, open "Terminal Services Manager" (in Administrative tools), connect to the problematic server and log off the unwanted sessions.  There are easy ways if you love command line based tools.

Query the Remote Server for Current Terminal Sessions

To query and list the sessions on the remote session, you could use QUser.exe or QWinst

QUser

QUser command comes with all the latest Windows clients and servers. This will list the sessions of the remote server (or local machine).

NOTE: if you are using Windows XP, you need to add this location into your System path: C:WindowsSystem32DLLCache. To do this, in command prompt, type the following.

SET PATH = %PATH%;C:WindowsSystem32DLLCache;

QUser help shows,

C:>QUser /?
Display information about users logged on to the system.

QUERY USER [username | sessionname | sessionid] [/SERVER:servername]

  username            Identifies the username.
  sessionname         Identifies the session named sessionname.
  sessionid           Identifies the session with ID sessionid.
  /SERVER:servername  The server to be queried (default is current). 

 QWinsta

QWinsta is little different and better. It has more features and options. It comes with all flavors of Windows.  QWinsta command line help displays as,

    C:>qwinsta /?
    Display information about Terminal Sessions.

    QUERY SESSION [sessionname | username | sessionid]
                  [/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]

      sessionname         Identifies the session named sessionname.
      username            Identifies the session with user username.
      sessionid           Identifies the session with ID sessionid.
      /SERVER:servername  The server to be queried (default is current).
      /MODE               Display current line settings.
      /FLOW               Display current flow control settings.
      /CONNECT            Display current connect settings.
      /COUNTER            Display current Terminal Services counters information.
Logoff the Remote Sessions

To Log off the terminal session of the remote server, you can use any one of two command line tools. One of LOGOFF and another one is RWINSTA. Before you log off the remote session, you should know the "Session ID" which you get it from "QUSER" OR "QWINSTA" commands as above stated.

 Logoff

Logoff command kicks off (logging off) the specified remote session. Log off help shows,

    C:>logoff /?
    Terminates a session.

    LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

      sessionname         The name of the session.
      sessionid           The ID of the session.
      /SERVER:servername  Specifies the Terminal server containing the user
                          session to log off (default is current).
      /V                  Displays information about the actions performed.

 RWinsta

RWinsta has same parameters and does same thing as log off command. It simply means Reset WINdows STAtion. The help goes as,

    C:>RWinsta /?
    Reset the session subsytem hardware and software to known initial values.

    RESET SESSION {sessionname | sessionid} [/SERVER:servername] [/V]

      sessionname         Identifies the session with name sessionname.
      sessionid           Identifies the session with ID sessionid.
      /SERVER:servername  The server containing the session (default is current).
      /V                  Display additional information.


Monday, April 22, 2013

View Dell Service Tags

It's not always convenient to run to the server room to try to find the Dell Service Tag on your machine, especially if you're tied to your phone on a tech support call. Here is how you can remotely find that tag.


1. C:\>wmic bios get serialnumber

Enter this into the command prompt and it will give you the Service Tag of your Dell System.
   
2. C:\>wmic /user:[username] /node:[computername] bios get serialnumber

The above command will return the Service tag for a remote computer if you don't have access to a remote desktop connection.
   
3. For Linux

dmidecode -s system-serial-number

This command will do the same thing if your box is running a Linux distrobution.

Wednesday, August 8, 2012

Download Microsoft Office 2013 Free All Versions


Download Microsoft Office 2013 Free All Versions

         Microsoft team has released the next version of Microsoft Office suite, called Microsoft Office 2013 or so called Office 365 Preview. Before, this office suite was code named as Office 15, and is now released to public for free download as Microsoft Office 2013 beta.

        Microsoft Office 2013 customer preview version comes with many new features, new metro UI and built in ability to edit pdf files. The download file available for Microsoft Office 2013 is by default offered as a basic installer and the complete package will be downloaded via network with the basic installer. But now you can get the full installer for Microsoft Office 2013 directly from Microsoft website. Check the office 2013 download files given at the end of post.

        The most surprising thing is that this version of MS Office 2013 will not support Windows XP or Windows Vista. You’ll require Windows 7 or Windows 8 to install office 2013.


Direct Download Link for Standalone Offline Installer (32-bit) (624 MB)

Direct Download Link for Standalone Offline Installer (64-bit) (702 MB)

Saturday, March 19, 2011

How To Configure ISA Proxy/Auth Setting For Yum

I was running CentOS in my LAN for my personal use and there are MS ISA servers for proxying and each user has to use his/her user name & password for Internet. So when I used my credentials in my web browser I had no problem but when I was going to do yum no success. After some googling I found this solution.

What is’NTLM Authorization Proxy Server’?

‘NTLM Authorization Proxy Server’ (APS) is a proxy software that allows you to authenticate via an MS Proxy Server using the proprietary NTLM protocol. Since version 0.9.5 APS has an ability to behave as a standalone proxy server and authenticate http clients at web servers using NTLM method. It can change arbitrary values in your client’s request header so that those requests will look like they were created by MS IE. It is written in www.python.org/” target=”_blank”>Python.

Main features:

  • supports NTLM authentication via parent proxy server (Error 407 Proxy Authentication Required);
  • supports NTLM authentication at web servers (Error 401 Access Denied/Unauthorized);
  • supports translation of NTLM scheme to standard “Basic” authentication scheme;
  • supports the HTTPS ‘CONNECT’ method for transparent tunnelling through parent proxy server;
  • has ability to change arbitrary values in client’s request headers;
  • supports unlimited number of client connections;
  • supports connections from external hosts;
  • supports HTTP 1.1 persistent connections;
  • stores user’s credentials in config file or requests password from a console during the start time;
  • supports intelligent failure detection and failover between multiple upstream proxies;

Download the ntlm rpm via your browser; because in my case Internet is working in firefox but not for yum you can also download on other pc and after that scp is the option for you.

ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/n/project/nt/ntlmaps/OldFiles/ntlmaps-0.9.9.6-1.i386.rpm

Just do copy&paste in your browser.

Open a terminal:

rpm -Uvh ntlmaps-0.9.9.6-1.i386.rpm

After that just edit server.cfg; you can find all related files by typing:

rpm -ql ntlmaps

In my case:

vi /etc/ntlmaps/server.cfg

and change the following parameters as per your requirements:
PARENT_PROXY:That_will_b_your_MS-Prosy_IP
PARENT_PROXY_PORT:That_will_b_your_MS-Proxy_Server_Port
NT_DOMAIN: That_will_b_Your_windows_Domain_name
USER:That_will_b_your_proxy-user
PASSWORD: That_will_b_your_Proxy-user_Password

Save & exit.

Now run ntlmaps deamon:

/opt/ntlmaps/main.py

You will see the following output:

NTLM authorization Proxy Server v0.9.9.6
Copyright (C) 2001-2005 by Dmitry Rozmanov, Darryl Dixon, and others.
Now listening at Testbed.abc.com on port 5865

If you see this – congratulations, you are done – otherwise troubleshoot it.

Now you have to export the proxy for yum:

http_proxy= http://127.0.0.1:5865

export http_proxy

Done!

add NTFS partitons to your Centos or RHEL

In this tutorial we will show you how to add NTFS partitions to your centos or RHEL

Install the rpmforge-release package as directed here and try the yum command again

The commands to type in order:

rpm -Uvh  http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install fuse fuse-ntfs-3g dkms dkms-fuse

Here is am example /etc/fstab entry for both you and madi_beni that should work at boot time;

 [root@localhost pirat9]# /sbin/fdisk  -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 6375 51207156 7 HPFS/NTFS
/dev/sda2 6376 19124 102406342+ 7 HPFS/NTFS
/dev/sda3 * 19125 19137 104422+ 83 Linux
/dev/sda4 19138 24321 41640480 5 Extended
/dev/sda5 19138 24321 41640448+ 8e Linux LVM
[root@localhost pirat9]# mkdir -p /mnt/windows_c

[root@localhost pirat9]# mkdir -p /mnt/windows_D

[root@localhost pirat9]# mount -t ntfs-3g /dev/sda1 /mnt/windows_c

[root@localhost pirat9]# mount -t ntfs-3g /dev/sda2 /mnt/windows_D

[root@localhost pirat9]# ls /mnt/windows_D
Acer-D Drivers Music RECYCLER Solaris System Volume Information
cod4- Maroua omnibot Softwars SOL-pack torrent

its working .

now you have to add these lines to /etc/fstab to make this mount permanently

/dev/sda1 /mnt/windows_c ntfs-3g auto,users,uid=0,gid=500,umask=000,rw 0 0

/dev/sda2 /mnt/windows_D ntfs-3g auto,users,uid=0,gid=500,umask=000,rw 0 0

please for any other question contact us in the forum of unixmen.net

Linux > Command line BitTorrent client

BitTorrent is the name of a peer-to-peer (P2P) file distribution protocol, and of a free software implementation of that protocol.

The BitTorrent client is a computer program developed by BitTorrent, Inc. used to download and upload files via the BitTorrent protocol. You can download python based command line BitTorrent client download for Linux/BSD/Mac OS X/UNIX link oses. This is quite useful, if you would like to download file remotely over SSH session. bittorrent.com offers bittorrent client in .deb (Debian Linux) or rpm (RedHat/Fedora Core/CentOS Linux) file formats.

To use the bittorrent in command line one you need to use command bittorrent-console or bittorrent-curses (see below for examples).
Step # 1: Find Python version

Make sure you download file according to your python version. Type following command to find out python version:
$ python -V
Output:

Python 2.4.2

Step # 2: Download bittorrent client

Use wget to download bittorrent client
Download bittorrent client for Debian Linux:

$ wget http://download.bittorrent.com/dl/bittorrent_5.0.3_python2.4.deb
Download bittorrent clientFor Red Hat / Fedora Core / Cent OS Linux

$ wget http://download.bittorrent.com/dl/BitTorrent-5.0.3-1-Python2.4.noarch.rpm
Step # 3: Linux Install BitTorrent client

First login as a root user (use su or sudo command). If you are using Debian Linux, use dpkg command install bittorrent client
# dpkg -i bittorrent_5.0.3_python2.4.deb
If you are using Red Hat / Fedora Core /Cent OS Linux, use rpm command install bittorrent client:
# rpm -ivh BitTorrent-5.0.3-1-Python2.4.noarch.rpm
Step # 4: Start using or downloading files

Use bittorrent client as follows:
$ /usr/bin/bittorrent-curses ‘http://www.some.org/DesktopBSD.iso.torrent’
OR
$ bittorrent-curses ‘http://www.some.org/DesktopBSD.iso.torrent’
OR
$ /usr/bin/bittorrent-curses ‘/path/to/file.torrent’
You can try out pure console based client bittorrent-console instead of curses based client:
$ bittorrent-console ‘/path/to/file.torrent’
$ /usr/bin/bittorrent-console ‘http://www.some.org/DesktopBSD.iso.torrent’
Tips about using and Troubleshooting BitTorrent client

(A) If you get [Errno 2] No such file or directory, you need to use wget or lynx command to download .torrent file to local hard drive first. For example
$ bittorrent-curses ‘http://www.mininova.org/get/some_file[222].torrent’
First download download .torrent file using any one of the following method:
$ lynx ‘http://www.mininova.org/get/some_file[222].torrent’
When prompted save .torrent file to a hard-disk. Another option is use wget to download .torrent file:
$ wget ‘http://www.mininova.org/get/some_file[222].torrent’
Now start the downloading as follows:
$ bittorrent-curses ‘some_file[222].torrent’

(B) If you get error ‘This seems to be an old Python version which does not support detecting the filesystem encoding. Assuming ‘ascii’, then upgrade your python version to 2.4.xx:

Debian user upgrade python version using apt-get command:
# apt-get update
# apt-get install python2.4

Red Hat Linux user try out:
# up2date python2.4
Fedora Linux user try out:
# yum install python2.4

Remember if you have both versions (python v2.3 and v2.4) installed, you need to run bittorent client as follows:
$ python2.4 /usr/bin/bittorrent-curses ‘/path/to/file.torrent’
Command line BitTorrent client should work with other UNIX like operating systems such as FreeBSD/OpenBSD/Solaris etc (as long as you have Python it should work).

The current client enables a range of features including multiple parallel downloads. It also intermediates peering between itself, source file servers (read as trackers) and other clients, thereby yielding great distribution efficiencies. The client also enables users to create and share torrent files. See help files for more information.
See also:

* Linux Iptables rules to open Bittorrent tcp ports 6881 to 6889

Install ntop for Centos|fedora|RHEL

Ntop is a network traffic probe that shows the network usage, similar to what the popular top Unix command does.but the positive side is that you can use a web browser to manage and navigate through ntop traffic information to better understand network status. Ntop is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform.

1- Install the required dependencies to install Ntop:

yum install   gcc gcc-c++ make libpcap libpcap-devel gdbm-devel libgd-devel libpng-devel libtool 
libtool-libs rrdtool rrdtool-devel

2- Now download and extract the latest version of ntop tool

wget http://superb-west.dl.sourceforge.net/sourceforge/ntop/ntop-3.3.9.tar.gz 

Extract

tar -xvf ntop-3.3.9.tar.gz 

then go to the extracted folder

 cd ntop-3.3.9

3- Now run the installation of Ntop :

./autogen.sh

4- Now use make

make

5-install

make install

6-create ntop user :

# useradd -M -s /sbin/nologin -r ntop

7-setup permioon for the ntop directories :

# chown ntop:root /usr/local/var/ntop/

 # chown ntop:ntop /usr/local/share/ntop/

8- setup ntop Admojn password

#ntop -A

9-start the ntop deamon :

# /usr/local/bin/ntop -d -L -u ntop -P /usr/local/var/ntop --skip-version-check   --use-syslog=daemon

10- now open your browser with port 3000

http://localhost:3000/ or  http://ip:3000

Install webmin on Redhat, Fedora, CentOS

ebmin is a web-based interface for system administration for Unix/. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotelyyou can also create backups for the system and restore.

Webmin is very usefull also for people that they run their own home server, and are not very good using the command line, webmin will help you administer your server with a graphic interface.

To install webmin on redhat,fedora, and CentOS :

First check for some dependencies if are installed

yum install perl-Net-SSLeay 

Now download latest version of webmin 1.480 :

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.480-1.noarch.rpm

Now install :

rpm -i webmin-1.480-1.noarch.rpm

Now to run webmin localy type :

https://localhost:10000

To login to another system remotely :

https://server-adress:10000

Note that many operating systems block by default port 10000, so if you can not login to webmin in your remote server ,follow step bellow to resolve it :

Login to your server via ssh ,and manually edit the firewall configuration file. On Redhat and derived systems, this is /etc/sysconfig/iptables

and add this line :

-A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT

It should be added in the file just after similar lines which grant access to ports 80, 22 and so on.

Now restart your iptables.

/etc/init.d/iptables restart

Links :