tag:blogger.com,1999:blog-17159936087474110962008-04-20T19:42:59.282+05:00Ahmed KhalidThis blog is dedicated to the articles, findings, innovative ideas related to latest technologies and advancements in the field of System/Network Administration.Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1715993608747411096.post-9799771864376579042008-04-20T15:31:00.005+05:002008-04-20T19:42:59.324+05:00Installing Squid<strong>Installation of squid</strong><br />wget <a href="http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE19.tar.gz">http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE19.tar.gz</a><br />tar -xzf squid-2.6.STABLE19.tar.gz<br />./configure<br />make install<br /><br /><strong>To install squid using yum</strong><br />yum install squid.i386<br /><br /><strong>Basic Configuration</strong><br /><strong></strong>Changes in squid.conf file<br /><br /><strong>Set visible hostname</strong><br />visible_hostname Fully Qualified Hostname of your machine<br /><br /><strong>Set port at which squid will listen</strong><br />http_port 3128<br /><br /><strong>Set access for your network</strong><br />acl our_networks src 172.16.254.0/255.255.255.0<br />http_access allow our_networks<br /><br /><strong>Set IP forwarding </strong><br />echo 1 > /proc/sys/net/ipv4/ip_forward<br /><br /><strong>IPtables Rules</strong><br />iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br /><br /><strong>Making it Transparent</strong><br />http_port 3128 transparent<br />always_direct allow all<br /><br /><strong>IPtables Rule</strong><br />iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128<br /><br /><strong>Creating SWAP Directories</strong><br />squid -z<br /><br /><strong>Starting Squid</strong><br />service squid start<br /><br /><strong>Autostart squid on bootup</strong><br />chkconfig --add squid<br />chkconfig squid onAhmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-15909441612045304792008-04-16T21:25:00.001+05:002008-04-16T21:27:49.045+05:00MTR - A Network Diagnostic ToolMTR or My traceroute is a computer program which combines the functionality of the traceroute and ping programs in a single network diagnostic tool.<br /><br />mtr probes routers on the route path by limiting the number of hops individual packets may traverse, and listening to responses of their expiry. It will regularly repeat this process, usually once per second, and keep track of the response times of the hops along the path.<br /><br /><a href="http://en.wikipedia.org/wiki/Mtr_(My_traceroute">http://en.wikipedia.org/wiki/Mtr_(My_traceroute</a>)Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-54289655737643619682008-04-16T21:16:00.003+05:002008-04-16T21:24:47.273+05:00Add OEM Branding on Windows Vista<strong>Adding the OEM Branding of Windows Vista: </strong><br /><br />The following tutorial covers how to add, remove, edit, change and modify the factory OEM branding that comes Windows Vista from system manufacturers. OEM's typically include their logo and other system builder information in the System information applet when the install Windows. The goal of this tutorial is to enable a user to customize the OEM "logo" and "manufacturer" information of the users Vista machine.<br />Removing or changing Windows Vista OEM branding:<br /><br />This process will change the OEM system branding that is displayed in the system properties section of Vista.<br /><br />Click Start and from the search box, type regedit<br />Navigate to the following path from within the registry:<br /><br />[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation<br />Now simply adjust the Logo and Manufacturer key values to suite your custom needs.<br />Logo Note: The logo needs to be in .bmp format and should be 120×120. Larger images will be automatically resized.<br /><br /><strong>Changing the Logo in the "performance information and tools" section of Vista:<br /></strong><br />Click Start and from the search box, type regedit<br />Navigate to the following path from within the registry:<br /><br />HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winsat\WindowsExperienceIndexOemInfo<br />Now simply adjust the Logo key value to suite your custom needs.<br />Logo Note: Again, the logo needs to be in .bmp format and should be 120×120. Larger images will be automatically resized.Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-86186810010780296832008-01-23T09:08:00.001+05:002008-04-17T01:25:56.300+05:00FileSystem Information in Windows (FSInfo)<div style="TEXT-ALIGN: justify" face="verdana"><span>This mode is one of the more interesting and immediately usable modes. It provides you with statistics regarding the file system. For example, you can use it to obtain a list of active drives on the current system. You could redirect this list to a text file for use with a script or output it to a batch file to perform a task on every attached drive. This mode uses the following syntax:<br /><br />FSUtil FSInfo [drives] [drivetype Volume] [volumeinfo Volume]<br />[ntfsinfo Volume] [statistics Volume]<br /><br />The following list describes each of the command line arguments.<br /><br />drives Displays the current list of active drives on the system.<br /><br />drivetype Volume Displays the drive information for the specified volume. The output is a generic term for the drive type such as Fixed Drive or CD-ROM Drive.<br /><br />volumeinfo Volume Displays statistics about the specified volume including the volume name, volume serial number, maximum component length, and file system name. In addition, the output tells whether the drive supports case-sensitive filenames, Unicode in filenames, filebased compression, disk quotas, sparse files, reparse points, object identifiers, encrypted file system, and named streams. Finally, you can determine whether the volume preserves the case of filenames, and if it preserves and enforces Access Control Lists (ACLs).<br /><br />ntfsinfo Volume Displays the low-level statistics about the NTFS volume. This informationincludes NTFS version, number of sectors, total clusters, free clusters, total reserved clusters, bytes per sector, bytes per cluster, bytes per file record segment, and clusters per file record segment.<br /></span></div>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-44421576478375400742008-01-19T21:10:00.001+05:002008-04-17T01:26:56.874+05:00Nessus<p align="justify"><span>NESSUS is a modular computer software system for performing probabilistic analysis of structural/mechanical components and systems. NESSUS combines state-of-the-art probabilistic algorithms with general-purpose numerical analysis methods to compute the probabilistic response and reliability of engineered systems. Uncertainty in loading, material properties, geometry, boundary conditions and initial conditions can be simulated. Many deterministic modeling tools can be used such as finite element, boundary element, hydrocodes, and user-defined Fortran subroutines. NESSUS offers a wide range of capabilities, a graphical user interface, and is verified using hundreds of test problems.NESSUS was initially developed by SwRI for NASA to perform probabilistic analysis of space shuttle main engine components. SwRI continues to develop and apply NESSUS to a diverse range of problems including aerospace structures, automotive structures, biomechanics, gas turbine engines, geomechanics, nuclear waste packaging, offshore structures, pipelines, and rotordynamics. To accomplish this, the codes have been interfaced with many well-known third-party and commercial deterministic analysis programs.</span></p><p align="justify"><span>http://www.nessus.com/</span></p>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-67960290556141493232008-01-19T21:01:00.000+05:002008-01-19T21:02:59.505+05:00Hardlink<p align="justify"><span style="font-family:verdana;font-size:85%;">A hard link is a connection between two files. The new file that you create is a pointer to the existing file. In essence, you’re creating another directory entry to a single file. The file continues to exist until you remove all of the directory entries pointing to it. Any change you make to the content of the new file also appears within the existing file, and vice versa. The main reason to use hard links is to create the same file in multiple locations on the hard drive. </span></p><p align="justify"><span style="font-family:verdana;font-size:85%;">For example, you might need to use the same initialization file with multiple applications. Instead of copying the file multiple times, you can simply create multiple hard links to it. This mode uses the following syntax:<br /></span><span style="font-family:verdana;font-size:85%;"></span></p><p align="justify"><span style="font-family:verdana;font-size:85%;">FSUtil Hardlink Create NewFilename Filename<br /></span><span style="font-family:verdana;font-size:85%;"><em></em></span></p><p align="justify"><span style="font-family:verdana;font-size:85%;"><em>Source: Sybex - Windows Administration at the Command Line</em></span></p><div align="justify"></div>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-52348934010499097192008-01-18T23:03:00.000+05:002008-01-21T15:13:09.715+05:00Placing a Command Prompt at Your Fingertips<div align="justify"><span style="font-family:verdana;font-size:85%;">It’s possible to change the Windows Explorer registry settings so that you can get a command prompt wherever you need one. For example, say you’re viewing the System32 folder and see a utility that you’ve never seen there before. You can use this registry change to right-click the folder and choose “Command Prompt Here” from the context menu to see a command prompt in that folder, rather than your home folder, as normal. Use the following steps to make this change manually.</span></div><div align="justify"><span style="font-family:verdana;font-size:85%;"><br /></div></span><div align="left"><span style="font-family:verdana;font-size:85%;">Open a copy of Notepad and type the script shown here precisely and save as CommandPromptHere.reg</span></div><div align="left"><span style="font-family:Verdana;font-size:85%;"></span> </div><div align="left"><span style="font-family:Verdana;font-size:85%;"></span></div><div align="left"><span style="font-family:Verdana;font-size:85%;"></span></div><div align="justify"><span style="font-family:verdana;font-size:85%;"></span></div><div align="justify"><span style="font-family:verdana;font-size:85%;"><em></em></span> </div><div align="justify"><span style="font-family:verdana;font-size:85%;"><em>Windows Registry Editor Version 5.00<br />[HKEY_CLASSES_ROOT\Folder\shell\Command_Prompt_Here]<br />@="Command Prompt Here"<br />[HKEY_CLASSES_ROOT\Folder\shell\Command_Prompt_Here\command]<br />@="cmd.exe /k \"cd %1\""</em></span></div><div align="justify"><em><span style="font-family:Verdana;font-size:85%;"></span></em> </div><div align="justify"><em><span style="font-family:Verdana;font-size:85%;"></span></em> </div><div align="justify"><em><span style="font-family:Verdana;font-size:85%;"></span></em></div><div align="justify"><span style="font-family:verdana;font-size:85%;"></span></div><div align="justify"><span style="font-family:verdana;font-size:85%;"></span></div><div align="justify"><span style="font-family:verdana;font-size:85%;">All you need to do is double-click this file in Windows Explorer to make the addition. </span><span style="font-family:verdana;font-size:85%;">You now have a tool that you can use to create a command prompt directly from Windows Explorer. Open a new copy of Windows Explorer, right-click a folder, and you’ll see the new Command Prompt Here entry.</span></div>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-49680472068332923302008-01-17T09:55:00.000+05:002008-01-17T10:02:54.596+05:00Vista - Boot Configuration Data<div align="justify"><span style="font-family:verdana;font-size:85%;">The Boot Configuration Data (BCD) store contains boot configuration parameters and controls how the operating system is started in Microsoft Windows Vista. These parameters were previously in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile RAM (NVRAM) entries (in Extensible Firmware Interface–based operating systems). </span></div><div align="justify"><span style="font-family:Verdana;font-size:85%;"></span> </div><div align="justify"><span style="font-family:verdana;font-size:85%;"></span></div><div align="justify"><span style="font-family:verdana;font-size:85%;">BCD was created to provide an improved mechanism for describing boot configuration data. With the development of new firmware models (for example, the Extensible Firmware Interface (EFI)), an extensible and interoperable interface was required to abstract the underlying firmware. This new design provides the foundation for a variety of new features in Windows Vista (for example, the Startup Repair tool and Multi-User Install shortcuts).</span></div>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-11829722288935230232008-01-17T09:42:00.000+05:002008-01-17T09:49:57.395+05:00Changing File and Directory Access with the CACLs Utility<p align="justify"><span style="font-family:verdana;font-size:85%;">The Check Access Control Lists (CACLs) utility verifies the security settings of a file or directory.<br />Windows attaches an Access Control List (ACL) to every directory and file on the system. The ACL<br />defines rights to the file or directory; it can also remove rights to the file or directory based on the<br />security setup for your system. Each ACL contains multiple entries called Access Control Entries<br />(ACEs). A user can have multiple entries, one for each right that the administrator grants or denies.<br /></span><span style="font-family:verdana;font-size:85%;"></span></p><p align="justify"><span style="font-family:verdana;font-size:85%;">This utility uses the following syntax:</span></p><span style="font-family:verdana;font-size:85%;"><p align="justify"><strong>CACLS</strong> filename [/T] [/E] [/C] [/G user:{R W C F}] [/R user [...]] [/P user:{N R W C F} [...]] [/D user [...]]<br /></p></span><span style="font-family:verdana;font-size:85%;"></span><p align="justify"><span style="font-family:verdana;font-size:85%;">The following list describes each of the command line arguments.</span></p><ul><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>filename</strong> Specifies the file to query or manage.</div></li></span><span style="font-family:verdana;font-size:85%;"></span><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/T</strong> Changes the ACLs of the specified files or directories in the current directory and all<br />subdirectories.</span></div></li><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/E</strong> Edits the ACL instead of replacing it. Normally, the system writes a new ACL. However, the<br />system can require a lot of time to perform the task when you change a large number of files that have complex ACLs. Unfortunately, editing the ACL can result in odd conditions where the user ends up with rights they shouldn’t have or lacks needed rights due to the order of the entries in the ACL. It’s normally a good idea to rewrite the ACL, rather than create a security hole.</div></li></span><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/C</strong> Ignores access denied errors by moving to the next file or next action.</div></li></span><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/G</strong> user:{R W C F} Grants the specified user read, write, change, or full control over a<br />file or directory.</div></li></span><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/R</strong> user Revokes the user’s access rights to the file or directory. You must use this command<br />line switch with the /E command line switch because this task requires editing the ACL, rather<br />than creating a new ACL. The use of /E is safe, in this case, because you’re removing ACEs from the list, rather than adding new ones.</div></li></span><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/P</strong> user:{N R W C F} Replaces the specified user’s access rights with new rights that<br />include none (no access), read, write, change, or full control.</div></li></span><li><div align="justify"><span style="font-family:verdana;font-size:85%;"><strong>/D</strong> user Denies file or directory access to the specified file or directory. This action is different<br />from the /R command line switch. When using the /R command line switch, the user’s access<br />becomes undefined or defined by other Windows elements such as a parent directory. In this<br />case, you specifically deny access to the user. Consequently, even if a user should have access based on access rights in a parent directory, this command line switch removes that access.</span></div></li></ul>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-16274436918646862612008-01-17T09:18:00.000+05:002008-01-17T09:30:17.369+05:00The power of "netsh"<p><span style="font-family:verdana;font-size:85%;">Netsh.exe is a powerful command line tool you can use to configure and manage multiple network connections, quickly and easily from the command line. Netsh allows for complete configuration of the network card(s) from the command line. </span></p><p><span style="font-family:verdana;font-size:85%;">Lets start by checking out the current configuration of the Local Arean Connection with this command: </span></p><ul><li><span style="font-family:verdana;font-size:85%;">netsh interface ip show address "Local Area Connection"</span> </li></ul><p><span style="font-family:verdana;font-size:85%;">We can change the IP address as well. The following command will set the IP address to 192.168.0.10, on the 255.255.255.0 subnet, with the gateway IP of 192.168.0.1</span></p><ul><li><span style="font-family:verdana;font-size:85%;">netsh interface ip set address name="Local Area Connection" 192.168.0.10 255.255.255.0 192.168.0.1 1 </span></li></ul><p><span style="font-family:verdana;font-size:85%;">Alternatively, if we want the adapter to use DHCP to obtain its network information, run the following command: </span></p><span style="font-family:verdana;font-size:85%;"><ul><li>netsh interface ip set address "Local Area Connection" dhcp</span> </li></ul><p><span style="font-family:verdana;font-size:85%;">Now if you are like me, you travel with a laptop between work and home. You can easily dump your adapter settings to a text file and import them quickly and easily with the following two commands: </span></p><ul><li><span style="font-family:verdana;font-size:85%;">netsh -c interface dump > c:\ipconfig.txt </span></li></ul><p><span style="font-family:verdana;font-size:85%;">Now, whenever you need to quickly import your IP settings</span> </p><ul><li><span style="font-family:verdana;font-size:85%;">netsh -f c:\ipconfig.txt</span></li></ul>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0tag:blogger.com,1999:blog-1715993608747411096.post-91795709388246102542008-01-17T09:13:00.001+05:002008-04-17T01:28:22.773+05:00How To: Determine what Services are running in Windows XP<p><span style="font-family:verdana;">When you bring up the Task Manager you'll see an entry for Services and the amount of memory consumed. However this one listing is actually all the Services combined into a single entry. As you can see I have them trimmed down to only the Services needed for this machine.<br />To view the complete list:</span></p><span style="font-family:Verdana;"></span><span style="font-size:85%;"><span style="font-family:verdana;"><ul><li><span style="font-size:100%;">From a command prompt: Start Run (type) cmd (click Ok)</span></li><li><span style="font-size:100%;">(type) tasklist /svc (press Enter)(XP Pro only)</span></li><li><span style="font-size:100%;">You will see all the Services running in process.</span></li></ul><p><strong><span style="font-size:100%;">To save the onscreen info:</span></strong></p><strong></strong><ul><li><span style="font-size:100%;">(type) "tasklist /svc >tasklist.txt" (no quotes)</span></span> </span></li></ul>Ahmedhttp://www.blogger.com/profile/06685694356563540390noreply@blogger.com0