Thursday, 30 August 2012

Changing Primary Group and Adding Secondary Group to a user


#  usermod -g testgroup user1

This command is used for changing a user’s primary group.




#  usermod -G testgroup user1

   This command is used for adding a secondary group to the user1.

Thursday, 2 August 2012

Using gzip & gunzip Commands



gzip =  this command is used to compress any type of file but not Dir. After using below command

file1 becomes “ file1.gz “.
        
   gzip file1
  
        OR


   gzip –v file1

(In the above command v = verbose )

gunzip =  This command is used to unzip a “ .gz “ file type. 
    gunzip file1.gz
   
          OR
    
    gunzip –v file1.gz

          OR

    
    gzip -dv file1.gz

( Where d = decompress ).

Monday, 23 July 2012

Using tar commands in Linux


tar =  this command is used to create a archive / backup / a bundle of any file or a dir.We can create a tar file of any file or dir.  The command is


(i)         tar cvf  file1.tar  testdir

                              OR

                 #  tar  cvf  /dev/st0  testdir  (  we can create a tar archive in a device also ).

  

  Note :---- “  .tar  “ extension is not compulsory .
 
     c = create a new archive.

    v = produces verbose message.

  f =  file1.tar (  archive name ) is name of new file.




(ii)  tar tvf file1.tar

   
  (  This command is used to see the original file name or dir name and  path of tar archive or tar file ).


(ii)       tar xvf  file1.tar
  
(  This command is used to untar a tar file ).

Thursday, 19 July 2012

Using scp command copy a file or dir


If you need to copy a file or a directory you can use the scp command from the machine where the

data is available. you can check out below examples....


#     scp  file1 192.168.1.10:/root/

                      (  This will copy  file1 ( source )  to remote host = 192.168.1.10  ( Destination )  in

specified location  i.e. the root path ).




#    scp  -r  xdir  192.168.1.10: /
              
  (  The ‘  -r   is used  to copy the dir. i.e.  Recursion ).


  

#   scp  -p  file1  192.168.1.10: /

       (  The ‘ –p ‘  is used for preserving original  times  and  permissions but please note that it can

not preserve original ownership and groupmembership ).

Monday, 16 July 2012

Using Xmanager - Xstart

Xstart in Xmanager:
For a Linux machine use the below command in xstart to get the display
/usr/bin/xterm -ls -display $DISPLAY
For a Unix machineuse the below command in xstart to get the display
/usr/openwin/bin/xterm -ls -display $DISPLAY

Monday, 9 July 2012

To turn OFF or turn ON the Hibernate Option in Windows


To DISABLE hibernate option in Windows 7 OS, please open a command prompt window in the administrators login and type the below command:

powercfg -h off


To ENABLE hibernate option in Windows 7 OS, please open a command prompt window in the administrators login and type the below command:

powercfg -h on

Friday, 6 July 2012

To check the Physical RAM size in a Linux server


Top command: using top command you will get complete information.
free –m  - This gives Physical memory (RAM) size in Megabytes
free –k - This gives Physical memory (RAM) size in Kilobytes
cat /proc/meminfo - This also gives Physical memory (RAM) size in Kilobytes

Wednesday, 4 July 2012

Enabling/Disabling Firewall in Linux:
To enable the firewall in Linux OS first check the status by below command
service iptables status
For Enabling:
service iptables start
For Disabling:
service iptables stop

Next use below command to check the firewall config
chkconfig --list iptables
It should give the output as shown below if firewall is stopped
iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off

If you want to turn ON 345 segments then need to run

chkconfig iptables on 345

Monday, 2 July 2012

Arachni Application Installation and management


Download the arachni (tar.gz) desired version and just extract it to the opt directory

Login as root

go to the below path

/opt/arachni/arachni-v0.4.0.2-cde

Next run the below commands

nohup ./arachni_rpcd &

nohup ./arachni_web &
Using nohup will generate a output file so that you can later check the log details.

Sunday, 1 July 2012

To repair the Internet Explorer with a command

Open up a command prompt in administrator mode and type in below command....

sfc /scannow

How to disable the beep sound in CPU’s



Go into Device Manager, click View then Show Hidden Devices, then expand Non-plug and play Drivers,

double-click Beep, Driver Tab, and click the Stop button

Thursday, 28 June 2012

To check the size of a directory or file in Unix

du -sk <File/Dir Name>   -------- This command will gives the size in only Kilo Bytes

du –h <File/Dir Name>   -------- This command will gives the size in MBytes/GBytes

Disable Telnet in Linux

1. To disable Telnet, you must edit the /etc/xinetd.d/telnet file. Open the Telnet file, using vi or
an editor of your choice.
2. Comment out the service telnet line by adding a number sign (#) before service telnet:
#service telnet
3. Write and quit the file.

Disable Telnet in Linux

1. To disable Telnet, you must edit the /etc/xinetd.d/telnet file. Open the Telnet file, using vi or
an editor of your choice.
2. Comment out the service telnet line by adding a number sign (#) before service telnet:
#service telnet
3. Write and quit the file.

Disable the sendmail service

# svcadm disable svc:/network/smtp:sendmail

Verify by checking the sendmail process

# ps -ef | grep sendmail

Below command will give full hardware information including physical memory

prtdiag -v
Memory check:
prtdiag | grep -i mem
prtconf |grep Mem

Command to extract CPIO file

cpio -icvdu < Filename

Enabling/Disabling Firewall in Solaris server

To enable FW
svcadm enable svc:/network/ipfilter:default

To disable it
svcadm disable svc:/network/ipfilter:default

Below command shows if ipf is running or not.
ipfstat -io

Enable ssh root login in Solaris 10

To enable SSH login for a Solaris server need to follow below process.
Enable ssh root login in Solaris 10
1. Change the file /etc/ssh/sshd_config with PermitRootLogin yes to replace PermitRootLogin no
2. restart the services
#svcadm restart svc:/network/ssh:default

PAN Details For Identity Proof


CIRCULATED FOR BENEFIT OF THE GENERAL PUBLIC
 Advice your tax payers not to quote PAN for Tatkal bookings…
 Indian Railways (IR) are displaying Tax Payers confidential information
(PAN) as identity proof for Tatkal bookings
 IR has started collecting PAN and other specified identity information in
support of Tatkal bookings as per recent direction and displaying the PAN
alongwith name, sex and age of reserved passengers on the reservation
charts pasted on to the railway compartments.
 This is a boon for benami transactions. Finance Act 2012 has made it
mandatory for certain traders like jewellery dealers to collect tax (TCS)
from customers on purchase of jewellery worth Rs.2 lakhs and above. While
complying with TCS rules for collection, payment and uploading of TCS
information (efiling of TDS returns) jewellery dealers have to furnish PAN
of customers.
 For certain customers it is not convenient to provide PAN as they may have
constraints in explaining source (black money earned through corruption,
undeclared incomes etc.,) and in such cases to accommodate high net worth
customers, the traders have a easy source of benami PAN numbers and all
particulars like name, sex and age from reserved railway compartments.
 While someone was recently traveling from Bangalore to Hyderabad they
noticed certain persons seriously copying PAN particulars alongwith name,
age and sex pasted on to the reserved compartments… and when they were
confronted with the help of railway police… they admitted that they are
paid Rs.10 per PAN particulars by jewellery traders.
 These persons are copying selected PAN information of senior citizens,
women etc., only from sleeper class with the intention that passengers in
sleeper class are not serious tax payers and generally salaried class.
 Impact on PAN holders who is a tax payer:
> This wrong usage of a PAN number… is known only to the regular tax
payers, who regularly check their tax credit on form 26 AS provided by the
Income Tax department on their website. This form 26 AS is updated only on
filing of e-TDS returns by the traders. There is almost 6-12 months time
delay for the PAN holder to know that a transaction of above nature has
taken place on his name and that too only if he goes through form 26 AS.
 > On noticing the tax credit of above nature while reconciling form 26 AS
for tax credits for filing the return during subsequent financial year i.e.
July / September… the tax payer has an option to exclude the same and go
ahead in filing the return.
 > In that case the department will first initiate action from the tax
payer’s side asking him to explain the sources of money for the above
transaction done in his name… and also to prove that he has not carried on
the above transaction. The onus lies on the genuine tax payer for the fault
committed by the traders. This dispute may even take more than 2 years to
be settled.

 *In conclusion… the only way to protect yourself from these fraudulent
transactions, is to avoid quoting PAN details for identity proof.*

know your PF balance through SMS

Know your PF balance through SMS. Its working  :)

Open below URL

http://www.epfindia.com/MembBal.html


Click on Click Here to know the balance

Select PF Office State

Click on Office Name and then....

Enter the details in member balance information page

For ex: AP/HY/12345/001234

Establishment code: 12345

Extension: leave blank for most of the cases

Account number: 001234

Name: As present in your company pay slip

Speech by Chetan Bhagat at Symbiosis...

Don?t just have career or academic goals. Set goals to give you a balanced, successful life. I use the word balanced before successful. Balanced means ensuring your health, relationships, mental peace are all in good order. There is no point of getting a promotion on the day of your breakup. There is no fun in driving a car if your back hurts. Shopping is not enjoyable if your mind is full of tensions.

"Life is one of those races in nursery school where you have to run with a marble in a spoon kept in your mouth. If the marble falls, there is no point coming first. Same is with life where health and relationships are the marble. Your striving is only worth it if there is harmony in your life. Else, you may achieve the success, but this spark, this feeling of being excited and alive, will start to die. ??????.

One thing about nurturing the spark - don't take life seriously. Life is not meant to be taken seriously, as we are really temporary here. We are like a pre-paid card with limited validity. If we are lucky, we may last another 50 years. And 50 years is just 2,500 weekends. Do we really need to get so worked up? ?????.

It's ok, bunk a few classes, scoring low in couple of papers, goof up a few interviews, take leave from work, fall in love, little fights with your 
spouse. We are people, not programmed devices........." 

"Don't be serious, be sincere."!!

Changing hostname in Solaris 10.0

We need to modify hostname in following files:
/etc/hosts
/etc/inet/ipnodes (for new versions it’s not required)
/etc/hostname.<interface>
/etc/nodename
and rename directory under /var/crash
cd /var/crash
mv oldname newname
Then reboot server.
and thats it done.