Sunday 18 May 2014

How to write Webutil dlls in user's home directory




In this article i will be describing "How to write Webutil dlls in user's home directory". Its need arises in Window 7 where normally users don't have write access to JRE directory and Webutil by default write its dlls in JRE\bin directory. These dlls are as follows.

1. jacob.dll
2. d2kwut60.dll
3. JNIsharedstubs.dll

Open the webutil.cfg file. You can find its location by finding the WEBUTIL_CONFIG parameter in default.env file. Look for "install.syslib.location.client.<os>" parameter in webutil.cfg file. Set this parameter to the directory where you want webutil to download its dlls. If you specify the absolute path then files will be download as indicated and if you specify relative path then files will be downloaded in users home directory + your specified path. Replace "<os>" tag with 0 in-case of windows and with 1 in-case of linux. Normally clients are on windows. You can specify values as follows.

install.syslib.location.client.0=webutil\syslib

Saturday 17 May 2014

Protecting Yourself: Disable Java System-Wide in Mac OS




If you are tired of keeping up with all the Java security updates and potential vulnerabilities, you can avoid a potential problem completely just by disabling Java.

For the average user, we’ve recommended keeping Java disabled as one of the primary means of protecting a Mac against potential malware, viruses, and trojans. In fact, the newest versions of OS X require that Java be installed manually to help mitigate potential threats and to keep people who do use it on the newest versions.
Whether you want to turn off Java system-wide or just in all of your web browsers for some added security, here is exactly how to do each of those tasks with Safari, Chrome, Firefox, or universally in all versions of OS X.
Disable Java Per Web Browser in Mac OS X
If you don’t want to disable Java everywhere because you need it for something like Eclipse or Minecraft, disable it on the web browser you use instead. Most of these browser-specific tips will work in Windows too if you feel like turning it off in the PC world too.
Disable Java in Safari

    Pull down the Safari menu and select “Preferences”
    Click the “Security” tab and uncheck the box next to “Enable Java”

Disable Java in Chrome

    Type “chrome://plugins/” into the URL bar, locate Java and click disable

Disable Java in Firefox

    Open Firefox Preferences and under the “General” tab click “Manage Add-ons…”

    Select “Plugins” and find Java (and/or Java Applet), click the Disable button

Protecting Yourself: Disable Java System-Wide in Mac OS X
You may recall that disabling Java was the number one tip we suggested when protecting a Mac against viruses and trojans, that’s because the majority of security problems that have effected Macs lately come from Java. If you haven’t done that yet, here’s how to do it now:

    Open “Java Preferences” from /Applications/Utilities/

    Uncheck “Enable applet plug-in and Web Start applications”

    Uncheck “ON” next to Java SE

Disable Java in Mac OS X

Most users won’t need Java on their Macs, but for the occasional cases when you do it can be beneficial to have one specific browser with Java remaining enabled, that way you can only use that browser when you need Java access, and use a more locked down browser for standard day to day web tasks.
If you need to, re-enabling Java is just a matter of going back to any of the preference panels discussed and checking the appropriate box again.

SSH to Unix/Linux with another port number





Connect to OpenSSH Server with different port number

#ssh  user@hostname -p9999

SYNOPSIS
ssh [-l login_name ] hostname | user@hostname [command ]

ssh [-afgknqstvxACNTX1246 ] [-b bind_address ] [-c cipher_spec ] [-e escape_char ] [-i identity_file ] [-l login_name ] [-m mac_spec ] [-o option ] [-p port ] [-F configfile ] [-L port host hostport ] [-R port host hostport ] [-D port ] hostname | user@hostname [command ]

Example:

#ssh john@10.1.1.1  -p1234

How to install uTorrent server in CentOS 6.3




    Update yum library

    $yum update -y

    

    Install library

    $yum install -y wget glibc glibc.i686 openssl openssl.i686 libgcc libgcc.i686 unzip

    

    Redirect libssl library path from libssl.so.1.0.0 to libssl.so.0.9.8

    $ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8
    $ln -s /usr/lib/libcrypto.so.10 /usr/lib/libcrypto.so.0.9.8

    

    Download utorrent for linux

    $wget "http://download.utorrent.com/linux/utorrent-server-3.0-ubuntu-10.10-27079.tar.gz"

    

    Extract file from download folder

    $tar xvf utorrent-server-3.0-ubuntu-10.10-27079.tar.gz

    

    Unzip web interface

    $cd utorrent-server-v3_0
    $unzip webui.zip

    

    Goto utorrent folder then start uTorrent

     ./utserver &


Open web browser then goto this link http:\\localhost:8080/gui    or http:\\ipaddress:8080/gui

Enter username admin without password

Friday 16 May 2014

XP users urged to switch alliegance to Linux

China's Ministry of Industry and Information of Technology (MIIT) urged Windows XP users in China to switch to domestically made computer operating systems, China Central Television (CCTV) reported on Saturday.
"We want users to pay attention to the potential security risk brought by their Windows XP system as Microsoft ceased providing further patch services. At the same time, the ministry will work on developing China's own computer system and applications based on Linux and we hope that the users will give more support to these domestically made products," Zhang Feng, chief engineer of MIIT, told CCTV.
According to Zhang, some 70 percent of China's computer users use Windows XP, including many local governments. The security threat posed by the XP system should not be underestimated, he said.
CCTV drew a comparison between Windows XP and a domestic computer system.
Video footage shows that the layouts of the two systems look basically the same and the speed of the domestic system is just about the same as XP.
However, some applications, such as QQ, Tencent's online chat software, cannot be installed on the domestically made operating system.
"Linux only accounts for 1 percent or less of the global market. It's natural that commercial companies are unwilling to develop software that adapts to this platform," said Hu Changjun, a research fellow from MIIT.
Some mobile devices, such as cellphones and cameras, are also unable to connect to the domestically made system.
"Many manufacturers do not provide corresponding drives for the Linux system," said Vice President of Standard Software Qiao Yong, citing similar reasons mentioned by Hu.
However, compared to Windows 8.1, the price of domestically made systems is significantly lower, which could serve as an advantage. Some of the systems can be downloaded for free.
"Other countries, like Russia and Germany, have already begun adopting their own operating systems in their governments. Our government needs to enhance its support for domestic products. We should not only rely on State-owned software enterprises but also invite other companies and industry associations to participate," said Ni Guangnan, an academician from the Chinese Academy of Engineering.

Tuesday 13 May 2014

How to setup file-based swap space on CentOS




In the name of Allah, Most Gracious, Most Merciful

In this article we will be configuring file-based swap space on CentOS. We often need to have swap space for larger programs to run properly. You can have swap partition for this purpose and also file-based swap space. File-based swap space is a quick way to setup swap file system. This method is tested on CentOS 6.5 but will work on Redhat 6. 5 as well. Lets do it.

First we need to check current swap space configured on system. Use following command to check it. You should be logged in as root user or use sudo with these commands.

swapon -s

It will print all swap file system, either file-based or partitioned-based. If nothing comes out then it means no swap space is configured. Lets add a 2GB file-based swap space.

dd if=/dev/zero of=/swapfile bs=1024 count=2048K

2097152+0 records in
2097152+0 records out
2147483648 bytes (2.1 GB) copied, 7.90701 s, 272 MB/s

if=/dev/zero means read from /dev/zero file which will provide null characters
of=/swapfile means write /dev/zero characters to this file.
bs=1024 means read and write 1024 bytes at a time
count=2048K means copy this many input blocks.

Lets make /swapfile a swap file system.

mkswap -f /swapfile

Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=5c109315-3512-45db-8771-a0ecd7ac11e1

Lets change ownership of this file to root and grant read and write permission to everyone.

chown root:root /swapfile
chmod 666 /swapfile

Lets activate this swap space and verify it.

swapon -a /swapfile
swapon -s

Filename                Type            Size    Used    Priority
/swapfile               file            2097144 0       -1

This swap space will only available as long as system is up and running, and is cleared on system reboot.

Lets make is permanent, we need to add it to /etc/fstab. add following line to end of /etc/fstab

/swapfile swap swap defaults 0 0


I hope it will serve the purpose.

Install Skype 4.2/4.0 on Fedora 20/19, CentOS/RHEL/SL 6.5




skype-logo-smallThis is guide, howto install Skype 4.2 on Fedora 20/19/18/17/16/15/14 and Skype 4.0 on CentOS/Red Hat (RHEL)/Scientific Linux (SL) 6.5/6.4/6.3/6.2/6.1/6. This is actually easy process, but I won’t use Skype own RPM package, which works only with Fedora 16+. Skype package also doesn’t care about any needed dependencies on 64-bit (x86_64) systems nor 32-bit (i686) systems. This guide uses Skype dynamic package (for Fedora) and static package (for CentOS/Red Hat (RHEL)/Scientific Linux (SL) 6.5/6.4/6.3/6.2/6.1/6) and all dependencies are installed manually.
1. Install Skype 4.2 on Fedora 20/19/18/17/16/15 and Skype 4.0 on CentOS/Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6
1.1 Change root user

su -
## OR ##
sudo -i

1.2 Install Needed Dependencies

yum install alsa-lib.i686 fontconfig.i686 freetype.i686 glib2.i686 libSM.i686 libXScrnSaver.i686 libXi.i686 libXrandr.i686 libXrender.i686 libXv.i686 libstdc++.i686 pulseaudio-libs.i686 qt.i686 qt-x11.i686 zlib.i686

Same command on multiple lines:

yum install alsa-lib.i686 fontconfig.i686 freetype.i686 \
glib2.i686 libSM.i686 libXScrnSaver.i686 libXi.i686 \
libXrandr.i686 libXrender.i686 libXv.i686 libstdc++.i686 \
pulseaudio-libs.i686 qt.i686 qt-x11.i686 zlib.i686

On Fedora install also following package:

yum install qtwebkit.i686

1.3 Download Skype 4.2 Dynamic or Skype 4.0 Static Package

cd /tmp

## Skype 4.2 Dynamic for Fedora ##
wget --trust-server-names http://www.skype.com/go/getskype-linux-dynamic

## Skype 4.0 Static for CentOS / Red Hat (RHEL) / Scientific Linux (SL) ##
wget http://download.skype.com/linux/skype_static-4.0.0.8.tar.bz2

1.4 Extract Skype

mkdir /opt/skype

## Extract Skype 4.2 on Fedora ##
tar xvf skype-4.2* -C /opt/skype --strip-components=1

## Extract Skype 4.0 on CentOS / Red Hat (RHEL) / Scientific Linux (SL) ##
tar xvf skype_static* -C /opt/skype --strip-components=1

1.5 Create libtiff.so.4 link on CentOS / Red Hat (RHEL) / Scientific Linux (SL)

Note: This is not needed on Fedora

cd /usr/lib

ln -s libtiff.so.3 /usr/lib/libtiff.so.4

1.6 Create Launcher, Link icons, lang and sounds

ln -s /opt/skype/skype.desktop /usr/share/applications/skype.desktop
ln -s /opt/skype/icons/SkypeBlue_48x48.png /usr/share/icons/skype.png
ln -s /opt/skype/icons/SkypeBlue_48x48.png /usr/share/pixmaps/skype.png

touch /usr/bin/skype
chmod 755 /usr/bin/skype

Open /usr/bin/skype with text editor and add following content:

#!/bin/sh
export SKYPE_HOME="/opt/skype"

$SKYPE_HOME/skype --resources=$SKYPE_HOME $*

2. Use Skype
2.1 Start Skype

From command line use skype command

skype

Sunday 11 May 2014

VirtualBox 4.3.10 on Fedora 20/19, CentOS/Red Hat (RHEL) 6.5/5.10





Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.

VirtualBox supports a large number of guest operating systems:

    Windows 3.x
    Windows NT 4.0
    Windows 2000
    Windows XP
    Windows Server 2003
    Windows Vista
    Windows 7
    Windows 8
    Windows 8.1
    DOS
    Linux (2.4, 2.6, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11)
    Solaris
    OpenSolaris
    OpenBSD

This guide shows howto install VirtualBox 4.3 (currently 4.3.10) on Fedora 20/19/18/17/16/15, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10, Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10. This guide uses Virtual Box own yum repositories.

Note: Fedora 14 users can install VirtualBox 4.1, Fedora 13 users can install VirtualBox 4.0 and Fedora 12 users can install VirtualBox 3.2.
1. Change to root User

su -


2. Install Fedora or RHEL Repo Files

cd /etc/yum.repos.d/

## Fedora 20/19/18/17/16/15/14/13/12 users
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo

## CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10 and Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10 users
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

3. Update latest packages and check your kernel version

Update packages

yum update

Check that that you are running latest installed kernel version
Output of following commands version numbers should match:

rpm -qa kernel |sort -V |tail -n 1

uname -r

Note: If you got kernel update or run older kernel than newest installed then reboot:

reboot

4. Install following dependency packages

CentOS 6/5 and Red Hat (RHEL) 6/5 needs EPEL repository, install it with following command:

## CentOS 6 and RHEL 6 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

## CentOS 5 and RHEL 5 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

## PAE kernel users install ##
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms

5. Install VirtualBox Latest Version 4.3 (currently 4.3.10)

yum install VirtualBox-4.3

Note:
This command create automatically vboxusers group and VirtualBox user must be member of that group.
This command also build needed kernel modules.

Rebuild kernel modules with following command:

/etc/init.d/vboxdrv setup
## OR ##
service vboxdrv setup

6. Add VirtualBox User(s) to vboxusers Group

Replace user_name with your own user name or some another real user name.

usermod -a -G vboxusers user_name

7. Start VirtualBox

Use launcher from menu or simply run:

VirtualBox

Troubleshooting

If you have problems with KERN_DIR parameter or your kernel directory is not automatically detected then set KERN_DIR environment variable manually, using following method:

## Current running kernel on Fedora ##
KERN_DIR=/usr/src/kernels/`uname -r`

## Current running kernel on CentOS and Red Hat (RHEL) ##
KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`

## Fedora example ##
KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686

## CentOS and Red Hat (RHEL) example ##
KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64

## Export KERN_DIR ##
export KERN_DIR

Tuesday 6 May 2014

Creating a self signed Apache SSL certificate

Creating a self signed Apache SSL certificate

if you ever need to use HTTPS or SSL with your website, you will need to have an SSL certificate created, which your Apache web server would use to hand out to the web browsers of the site visitors. The certificate is normally generated at the time of Linux installation of your PC/server, during Apache installation. However, this certificate would be created for a machine, named “localhost.localdomain” . When a web browser visits such a site , it sees this certificate, and also sees that it does not match the website's hostname or FQDN. Modern browsers see it as a threat, or something “fishy”. Here is how you would create a new certificate for your website, on your web server. I am using CentOS 5.3 .

Your Apache ssl.conf in /etc/httpd.conf.d directory has the following SSLCertificate related directives.

[root@www conf.d]# grep SSLCertificate /etc/httpd/conf.d/ssl.conf
# Point SSLCertificateFile at a PEM encoded certificate. If
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
# Point SSLCertificateChainFile at a file containing the
# the referenced file can be the same as SSLCertificateFile
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
[root@www conf.d]#

Also note down the permissions set of these two files:-

[root@www conf.d]# ls -lh /etc/pki/tls/certs/localhost.crt
-rw------- 1 root root 1.5K May 5 23:02 /etc/pki/tls/certs/localhost.crt

[root@www conf.d]# ls -lh /etc/pki/tls/private/localhost.key
-rw------- 1 root root 891 May 5 23:02 /etc/pki/tls/private/localhost.key


Now create the new certificate files:

[root@www conf.d]# openssl req -new -days 365 -x509 -nodes -out /etc/pki/tls/certs/server.crt -keyout /etc/pki/tls/private/server.key

Generating a 1024 bit RSA private key
......++++++
...................................++++++
writing new private key to '/etc/pki/tls/private/server.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:US
State or Province Name (full name) [Berkshire]:California
Locality Name (eg, city) [Newbury]:Los Angeles
Organization Name (eg, company) [My Company Ltd]:Example Web Site
Organizational Unit Name (eg, section) []:Web
Common Name (eg, your name or your server's hostname) []:www.example.com
Email Address []: webserver@example.com

Note that the files are called server.crt and server.key . You can have any name for these files though. Now you should update your ssl.conf file to use thse files instead of the localhost.crt and localhost.key .

[root@www conf.d]# vi /etc/httpd/conf.d/ssl.conf
...
SSLCertificateFile /etc/pki/tls/certs/server.crt
...
SSLCertificateKeyFile /etc/pki/tls/private/server.key
...
...

Update the permission set of these two files :-

[root@www conf.d]# chmod 0600 /etc/pki/tls/certs/server.crt

[root@www conf.d]# chmod 0600 /etc/pki/tls/private/server.key


[root@www conf.d]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

That is all.

Remember, that this is still a self signed certificate. That means browser clients will still see a “this certificate is no good”, type of message before presenting the site. But this does give the viewer a peace of mind. 

Web-email such as SquirrelMail setup as http://www.example.com/webmail, should now be able to work as https://www.example.com/webmail .

Please note that Apache SSL certificates cannot be used with Name based Virtual Hosts.

IPv6 (Internet Protocol Version 6)



IPv6 (Internet Protocol Version 6)

IPv6 (Internet Protocol version 6) is a set of specifications from the Internet Engineering Task Force (IETF) that's essentially an upgrade of IP version 4 (IPv4). The basics of IPv6 are similar to those of IPv4 -- devices can use IPv6 as source and destination addresses to pass packets over a network, and tools like ping work for network testing as they do in IPv4, with some slight variations.
The most obvious improvement in IPv6 over IPv4 is that IP addresses are lengthened from 32 bits to 128 bits. This extension anticipates considerable future growth of the Internet and provides relief for what was perceived as an impending shortage of network addresses. IPv6 also supports auto-configuration to help correct most of the shortcomings in version 4, and it has integrated security and mobility features.
IPv6 features include:
  • Supports source and destination addresses that are 128 bits (16 bytes) long.
  • Requires IPSec support.
  • Uses Flow Label field to identify packet flow for QoS handling by router.
  • Allows the host to send fragments packets but not routers.
  • Doesn't include a checksum in the header.
  • Uses a link-local scope all-nodes multicast address.
  • Does not require manual configuration or DHCP.
  • Uses host address (AAAA) resource records in DNS to map host names to IPv6 addresses.
  • Uses pointer (PTR) resource records in the IP6.ARPA DNS domain to map IPv6 addresses to host names.
  • Supports a 1280-byte packet size (without fragmentation).
  • Moves optional data to IPv6 extension headers.
  • Uses Multicast Neighbor Solicitation messages to resolve IP addresses to link-layer addresses.
  • Uses Multicast Listener Discovery (MLD) messages to manage membership in local subnet groups.
  • Uses ICMPv6 Router Solicitation and Router Advertisement messages to determine the IP address of the best default gateway.

Saturday 3 May 2014

How To Install VNC Server On CentOS


VNC (Virtual Network Computing ) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol to remotely control another coumputer on a network.

To run the VNC Server on CentOS, we have to install these required packages:

yum groupinstall Desktop
yum install tigervnc-server
yum install xorg-x11-fonts-Type1
yum install vnc


To start VNC Server on boot


chkconfig vncserver on
To setup users’ VNC password:


vncpasswd
Edit the /etc/sysconfig/vncservers file:


nano /etc/sysconfig/vncservers
Add the following to the end of the file:


VNCSERVERS="1:vn"
VNCSERVERARGS[1]="-geometry 1024x600"
The iptables rules need to be amended to open the VNC ports:


iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
service iptables save
service iptables restart
Restart the VNC Server:


service vncserver restart

Now kill the VNC Server:


vncserver -kill :1

Edit the xstartup file in .vnc directory:


nano .vnc/xstartup

Comment the last line and run the Gnome:


#twm &

exec gnome-session &

Restart the service:


service vncserver restart

Now, download VNCViewer onto our desktop computer from which we want to access the shared desktop.

Connect using ServerIP/Name:1 (:1 is for the VNC server window)

http://www.realvnc.com/download/viewer/

Enter the password that we created using the vncpasswd command:

Ability to connect for multiple users:

Create a local user, using the following command:


adduser vnc

Create a password for newly created user:


passwd vnc

Switch to the newly created user and run vncpasswd command for it:

su vnc


vncpasswd

Edit the /etc/sysconfig/vncservers file:


nano /etc/sysconfig/vncservers

Add these lines for new user:


VNCSERVERS="1:vn 2:vnc"

VNCSERVERARGS[1]="-geometry 1024x600"

VNCSERVERARGS[2]="-geometry 1024x600"

Restart the VNC service:


service vncserver restart

Kill the vncserver session for new user and edit the xstartup file:


su vnc

vncserver -kill :2

cd ~

nano .vnc/xstartup

Modify the file so it looks like this:


#twm &

exec gnome-session &

Restart the VNC service:


service vncserver restart

Test Internet Connection Speed with Command Line in LINUX



“ Most of the time We don’t have Graphical User Interface(GUI) on Our Servers. In this case how can we test internet Speed in Our Server ?”


So for that there is a very helpful command called speedtest_cli.py

Lets Move on Installation part :-

I am on my Centos 6.5 (64Bit) Server:-

[root@test ~]# cat /etc/issue

CentOS release 6.5 (Final)

Kernel \r on an \m

Download Speedtes_cli.py:-

root@test ~]# wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py



Move this on your command shell:-

[root@test ~]# mv speedtest_cli.py /usr/local/bin/



Give the Execute adn Owen permissions:-

[root@test ~]# chmod +x /usr/local/bin/speedtest_cli.py

[root@test ~]# chown root:root /usr/local/bin/speedtest_cli.py

 

Now Test Your Speed :— :)

[root@test ~]# speedtest_cli.py

Retrieving speedtest.net configuration…

Retrieving speedtest.net server list…

Testing from Airtel Broadband (192.xxx.xxx.xx)… <========== Your Publice IP

Selecting best server based on ping…

Hosted by your ISP [3.13 km]: 16.371 ms

Testing download speed………………………………….

Download: 15.15 Mbit/s <======= your Downloading Speed

Testing upload speed…………………………………………..

Upload: 2.52 Mbit/s <============ Your Uploading Speed.



It given us all Information about our Internet speed, IP, Downloading and Uploading speed etc …..

VLC Media Player Installation on Centos 6.4




Fisrt we need to download a repo called linuxtech.repo :-

[root@sahil ~]# cd /downloads

[root@sahil ~]# cd /downloads/

[root@sahildownloads]#wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo

Move repo in /etc/yum.repos.d/ direcotory :-

[root@sahil downloads]# cp linuxtech.repo /etc/yum.repos.d

Now install VLC player by using yum :-

[root@sahil~]#yum install vlc -y

Check your VLC player :-

Command line:-

[root@sahil ~]# vlc &

Graphically :-

Go to Applicataion—> Sound and Videos —-> VLC media player .

Installation Completed :) Now play your Videos.

If you want to run as a root user then please run below command:-



#sed -i ‘s/geteuid/getppid/’ /usr/bin/vlc

Friday 2 May 2014

How to setup sudo on Oracle Solaris 10

sudo program executes a command with super user privileges with out login with super user. su command do the same but requires to login with super user. In this article i will describe to install and configure sudo packages on Oracle Solaris 10.

You need to have following packages to properly install sudo program. I assumed fresh Oracle Solaris 10 installed which don't have following packages installed.

4. SMCsudo

You can get stable (or latest) releases of these packages from thiswebsite. you can use pkginfo command to check if these packages are already installed on your system.

pkginfo SMClinconv

You can install the above packages by transferring these packages to Solaris system and then switch to root user.

su - root
gunzip libiconv-1.9.2-sol10-x86-local.gz
pkgadd -d libiconv-1.9.2-sol10-x86-local

gunzip libgcc-3.4.6-sol10-x86-local.gz
pkgadd -d libgcc-3.4.6-sol10-x86-local

gunzip libintl-3.4.0-sol10-x86-local.gz
pkgadd -d libintl-3.4.0-sol10-x86-local

gunzip sudo-1.8.3p2-sol10-x86-local.gz
pkgadd -d sudo-1.8.3p2-sol10-x86-local

respond with "add" and "y" to questions asked by pkgadd program.

Now you can create symbolic link for sudo program
ln -s /usr/local/etc/sudoers /etc/sudoersln -s /usr/local/bin/sudo /bin/sudoln -s /usr/local/bin/sudoedit /bin/sudoedit
Now last thing is to add privileged users to /etc/sudoersThis file has 0440 privileged so you need make is writable to add users.chmod 0777 /etc/sudoersvi /etc/sudoers#### User privilege specification##root ALL=(ALL) ALLoracle ALL=(ALL) ALL
now save and change file privileges to 0440 by using following commandchmod 0440 /etc/sudoersNow exit from root and verify command by following method/bin/sudo -u root /usr/sbin/ping localhostIf everything is write you will see response
localhost is aliveif some library missing error you can see which library is missing by usingfollowing command with root userldd /bin/sudoyou will see some (file not found) errors. note library name and download thepackages and use the above method to install missing packages. Installation and Configuration of sudo program completes.

How to configure Samba in Oracle Solaris 10





Samba comes installed with Oracle Solaris 10. We only have to configure it according to our needs. Following are steps to properly configure samba according to our needs.

You can verify that samba packages are already installed in Oracle Solaris 10 by following command.

1. pkginfo -x | grep -i samba

SUNWsmbac    samba - A Windows SMB/CIFS fileserver for UNIX (client)
SUNWsmbar    samba - A Windows SMB/CIFS fileserver for UNIX (Root)
SUNWsmbau    samba - A Windows SMB/CIFS fileserver for UNIX (Usr)


2. You can check the location of samba config file by following command

pkgchk -l SUNWsmbar | grep conf-example

Pathname: /etc/samba/smb.conf-example

3. Check current state of samba

svcs -a | grep samba

disabled       Feb_22   svc:/network/samba:default

4. Try to enable samba

svcadm enable samba

maintenance    10:27:33 svc:/network/samba:default

It is not enabled, but it is in maintenance mode. You can check the errors encountered while enabling samba by following command.

tail /var/adm/messages

mysystem svc.startd[8]: [ID 652011 daemon.warning] svc:/network/samba:default: Method "/usr/sbin/smbd -D" failed with exit status 1

It means samba failed to start, it most likely due to missing config file.

5. Now copy the sample config file and modify it

cp /etc/samba/smb.conf-example /etc/samba/smb.conf

By default config file is readonly, so make is right able by following command.

chmod 0777 /etc/samba/smb.conf

vi /etc/samba/smb.conf

Add following section in smb.conf file.

[myshare]
comment = My Share
force user = oracle
path = /u01/app/oracle
writeable = no
guest ok = yes


now save file and exit vi.

6. Now change the rights on smb.conf file as before

chmod 0444 /etc/samba/smb.conf

7. Now try to disable samba

svcadm disable samba
svcs -a | grep samba
disabled       10:41:49 svc:/network/samba:default


8. Now try to enable samba again

svcadm enable samba
svcs -a | grep samba
online         10:42:04 svc:/network/samba:default


9. Now set password for oracle user to use "myshare". 

smbpasswd -a oracle

10. Now on windows try to map drive

net use O: \\192.168.1.20\myshare

Configuration of samba completes.

Sharing directories with NFS in Solaris 10


If You want to share a directory in Solaris, may be, the home users, or a directory with binaries.
With svcs the service status can be checked, so lets check the status of the nfs server:
-bash-3.00# svcs network/nfs/server

STATE STIME FMRI

offline 2:19:03 svc:/network/nfs/server:default

The service is offline, so you have to enable it and start it, lets do it:

-bash-3.00# svcadm enable -r network/nfs/server
-bash-3.00# svcadm enable -s network/nfs/server
-bash-3.00# svcadm restart network/nfs/server

Now it is started:

-bash-3.00# svcs network/nfs/server
STATE STIME FMRI
online 2:29:51 svc:/network/nfs/server:default

Now, to share a directory, edit /etc/dfs/dfstab and add:

share -F nfs /export/test

Save the file and execute:

# shareall -F nfs

Now check the shares:

-bash-3.00# share
- /export/test rw ""