Skip to main content

Posts

SSL and IIS

An Overview on Secure Sockets Layer (SSL) With IIS, you can further secure websites by using the Secure Sockets Layer (SSL) encryption technology. SSL was developed by Netscape Communications, and enables secure communication over the Internet. SSL operates at the transport layer of Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite, and uses public key cryptography to establish a secure SSL session between a Web server and client. A few features provided by SSL include authentication, message integrity, and data confidentiality through encryption. To utilize SSL in IIS, the Web server has to obtain a digital certificate from a certification authority (CA), and install the digital certificate as well. A digital certificate usually contains a version number that identifies the X.509 standard version used for the certificate; the serial number of the certificate; the CA that issued the certificate; the signature algorithm identifier which defines the CA’s al

Command to delete user password under Linux

Type the following command to delete a user password: # passwd --delete username OR # passwd -d username Above command delete a user's password (make it empty). This is a quick way to disable a password for an account. It will set the named account passwordless. User will not able to login. It is also a good idea to setup user shell to nologin to avoid security related problems: # usrmod -s /sbin/nologin username For example to delete password for user johnc, Type: # passwd -d johnc # usrmod -s /sbin/nologin johnc

Rescan dynamically the scsi bus (applicable to CX Clariion SAN infrastructure)

Rescan dynamically the scsi bus I've been working for a while with a Dell - Clariion CX-300, and the best way to add new attached LUNs was always to reboot the server. However, that procedure is not always the most acceptable if you're in a hurry or if just want to do some tests. I found the procedure described above, in an outdated website, but worked very well in my case. I also recommend to use rescan-scsi-bus.sh script with the options -lwc. Type rescan-scsi-bus.sh --help to see the description of each option. /root/rescan-scsi-bus.sh Host adapter 1 (qla2xxx) found. Host adapter 2 (qla2xxx) found. Scanning for device 1 0 0 0 ... OLD: Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: DGC Model: LUNZ Rev: 0208 Type: Direct-Access ANSI SCSI revision: 04 Scanning for device 2 0 0 0 ... OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: DGC Model: LUNZ Rev: 0208 Type: Direct-Access AN

List all Users and Groups in Domain

From the support tools we can find LDIFDE.exe, which is a tool for bulk import and export of Active Directory Objects. You can use LDIFDE to import new user records into the directory, or export specific information on specific users into a text file. LDIFDE defaults to export mode (reading From the Directory). When you add the -i option it can be used to write changes into the Directory. Also, if you want to export and extract only specific details, such as the user name, title and login name for all the users in a specific OU (Organizational Unit), you can run the following command: ldifde -f C:\ldif\ExportUsers.ldf –s SERVERNAME -d "OU=YourOUname,dc=YourDomainName,dc=com" -p subtree -r "(objectClass=User)" -l "cn,givenName,Title,SamAccountName"

Changing settings in VMware vSphere or Infrastructure Client

To change the hostname, domain, DNS servers, and default gateway in VMware vSphere or Infrastructure (VI) Client: Highlight the ESX host and click the Configuration tab. Click DNS and Routing . Click Properties . To change the hostname, domain, and DNS servers, click the DNS Configuration tab and enter the appropriate values. Note : Disable VMware High Availability if you do not want virtual machines to failover during the hostname IP change. To change the default gateway, click the Routing tab and enter the appropriate value. Reboot the ESX host for the changes to take effect. Reconnect the ESX host to vCenter Server with the new IP address.

Changing the IP address, default gateway, and hostname of the Service Console in ESX

Run the following command to set the IP address: [root@server root]# esxcfg-vswif -i <a.b.c.d> -n <w.x.y.z> vswif0 , where <a.b.c.d> is the IP address and <w.x.y.z> is the subnet mask. Note : In this example, v swif0 is the Service Console adapter that is the interface to which you are applying the IP address change. Open the /etc/hosts file with a text editor and modify it so that it reflects the correct IP address and hostname. To change the default gateway address and the hostname, edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values. For the changes to take place, reboot the host or restart the network service with the command: [root@server root]# service network restart Note : This command breaks any current network connections to the Service Console. 

How-to enable web access in ESX 4 vSphere

If you need to access your ESX 4.0 server through your web browser via HTTPS , you might not succeed at first try. You will receive an error "503 Service unavailable". So what to do? 01.) You first I check for the service if it's running or not. Go to the console and log in. Then type in following command to see if the service is running : (it's case sensitive) service vmware-webAccess status 02.) Start the service:  service vmware-webAccess start It seems that this service is disabled by default. Then, if you need to have web access enabled every time your start your ESX Server, then you can do it by executing folowing command: chkconfig --level 345 vmware-webAccess on or simply: chkconfig vmware-webAccess on

How to delete old files in Linux

In order to delete OLD files older than XX days, execute following command on your Linux box, where /opt/app/logs is the directory where files are located: find /opt/app/logs -mtime +XX -exec rm {} \; For example, to delete files older than 90 days: find /opt/app/logs -mtime +90 -exec rm {} \; If the same directory has multiple type of files, and want to delete ONLY those with .log extension: find /opt/app/logs -name '*.log' -mtime +90 -exec rm {} \; If you want to see the files to be deleted, run the same command removing "-exec rm {} \;"