Showing posts with label LINUX. Show all posts
Showing posts with label LINUX. Show all posts

Thursday, 22 June 2017

mount cifs -bash: !,uid=,gid=: event not found

Error:
While mounting cifs windows shared file system with RHEL getting below error

mount -t cifs -o username=admin,password=admin,uid=1010,gid=1011 //1.1.1.1/SHARE /mnt/SHARE
-bash: !,uid=54322,gid=54324: event not found


Solution:

The order of the value is wrong try with below.

mount -t cifs -o uid=1010,gid=1011,username=admin,password=admin //1.1.1.1/SHARE /mnt/SHARE

umount lsof: WARNING: can't stat() cifs file system /mnt

Error:
When trying to umount the cifs windows shared mount point getting below error even after killing using fuser output.

umount /tmp

umount lsof: WARNING: can't stat() cifs file system /mnt
      Output information may be incomplete.
lsof: status error on /mnt: No such device


Soluiton:
Use force un mount.

 umount -f -a -t cifs -l /mnt/

Tuesday, 20 June 2017

vnc viewer connect:A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call no address was supplied 10057



Error:
In Linux after starting vncservice,When i try to connect from laptop.Getting below error
vnc viewer connect:A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call no address was supplied 10057

Solution:
stop the firewall in linux and try

#service iptables stop

Then try to connect using vncviewer 

Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr

Error:

Running application program in Linux getting below error



Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr
 

Solution:
Install rpm Install perl-devel and perl-CPAN

yum install  perl-devel*
yum install  perl-CPAN*

Thursday, 9 March 2017

VMware CDROM mount in RHEL

Below info will give how to mount the CDrom in VM RHEL.

Once you mount the ISO in VMware option,Login to the RHEL Linux as root and enter the below command

# mount /dev/cdrom  /media/

then cd to /media you will see all the files from RHEL.


Linux sendmail configuration using microsft exchange setup step by step


Below steps will help to configure the sendmail alert using microsoft exchange


Step: Check the RPM’s(sendmail and m4) are installed in RHEL

Rpm –qa|grep –i send If no sendmail rpms are installed then install the below RPM’s

Then install m4 rpm

++ After that you can see the folder /etc/mail

Now edit /etc/mail/sendmail.mc

++ 1st edit /etc/mail/sendmail.mc

From
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
To
#DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

++ 2nd edit, add below line after MAILER

FEATURE(`relay_hosts_only')dnl
MAILER(smtp)dnl

Save the file /etc/mail/sendmail.mc then

++ 3rd add below,
# hostname >> /etc/mail/relay-domain

++ 4th Recompile
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

If you get the error “/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory”

Install RPM sendmail-cf* like
rpm –ivh sendmail-cf*

And retry

++ After that add exchange server details in /etc/mail/sendmail.cf
FROM:
# "Smart" relay host (may be null)
DS

TO:
# "Smart" relay host (may be null)
DSExchangeserver.com

++ After that restart the sendmail

# /etc/init.d/sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]

Now test the mail server
echo "Subject: sendmail test" | sendmail –v abc@xyz.com

You can verify the logs /var/log/maillog

Monday, 27 July 2015

PRVF-0002:Could not retrieve local hostname

When trying to start runInstaller getting below erro

PRVF-0002:Could not retrieve local hostname

Solution:

Update proper IP and hostname in /etc/hosts.

After that retry.

RHEL xclock command not found

When i try to installing the runInstaller java is not poping to go through installation.

So as root when i try xhost + and xclock i am getting below error.

[root@ Desktop]# xhost +
access control disabled, clients can connect from any host
[root@ Desktop]# xclock
bash: xclock: command not found
[root@Desktop]# 

Solution:

Load RHEL iso and install x11 rpm.

In my case i installed xorg-x11-apps-7.6-6.el6.x86_64.rpm then xclock started working as well as runInstaller.

How to create password less sudo linux user access on RHEL linux

This can be achieved by Creating admin group then creating user with admin group.

and the by adding admin group in /etc/sudoers file.

Step-1:Create admin group
/usr/sbin/groupadd -g 2000 admins

Step2: Create user with admin group.
/usr/sbin/useradd -u 1102 -g admins newuser

Step-3: Add admin group in /etc/sudoers file.

#visudo

root    ALL=(ALL)       ALL
#Add below line in the file
%admins ALL=(ALL)       NOPASSWD:ALL

To set the password
passwd newuser

Wednesday, 3 December 2014

Iscsiadm how to remove and read add sigle iscsi lun in RHEL

++ To see what are the iscsi session in the server.

[root@<< node-1r>> bin]# iscsiadm -m session
tcp: [1] <<Iscsi_IP>>:<<Iscsi_Port>>,1 -52aed6-1020955b2-73f0018d44551483-<<storagel-server>>-fra01
tcp: [10]
<<Iscsi_IP>>:<<Iscsi_Port>>,2 .dell:powervault.md3200i.02140000000004de47c62
tcp: [11]
<<Iscsi_IP>>:<<Iscsi_Port>>,1 dell:powervault.md3200i.000000004de47c62
tcp: [12]
<<Iscsi_IP>>:<<Iscsi_Port>>,1 dell:powervault.md3200i.6782bcb000302140000000004de47c62
tcp: [2] <<Iscsi_IP>>:<<Iscsi_Port>>,1 equallogic:4-52aed6-08f0955b2-cb40018d44351483-<<storagel-server>>-data01
tcp: [3] <<Iscsi_IP>>:<<Iscsi_Port>>,1 equallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01
tcp: [4] <<Iscsi_IP>>:<<Iscsi_Port>>,1 equallogic:4-52aed6-e9a0955b2-28600231d0f53e6e-<<storagel-server>>-data01-extent
tcp: [5]
<<Iscsi_IP>>:<<Iscsi_Port>>,1 dell:powervault.md3200i.6782bc000004de47c62
tcp: [6]
<<Iscsi_IP>>:<<Iscsi_Port>>,1 dell:powervault.md3200i.6782bc0000004de47c62
tcp: [7]
<<Iscsi_IP>>:<<Iscsi_Port>>,2 dell:powervault.md3200i.6782bcb000300004de47c62
tcp: [8]
<<Iscsi_IP>>:<<Iscsi_Port>>,2 dell:powervault.md3200i.6782bc00004de47c62
tcp: [9]
<<Iscsi_IP>>:<<Iscsi_Port>>,2 dell:powervault.md3200i.6782bcde47c62

++ To remove a single lun
[root@<< node-1r>> bin]# iscsiadm -m node -u -T iqn.2001-05.com.equallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01 -p <<Iscsi_IP>>





 

Logging out of session [sid: 3, target: equallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01, portal: <<Iscsi_IP>>,<<Iscsi_Port>>]
Logout of [sid: 3, target: equallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01, portal: <<Iscsi_IP>>,<<Iscsi_Port>>] successful.

++ To re-attach the lun

[root@<< node-1r>> bin]# iscsiadm -m node -l -T iqn.2001-05.com.equallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01 -p <<Iscsi_IP>>


 

Logging in to [iface: default, target: .equallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01, portal: <<Iscsi_IP>>,<<Iscsi_Port>>] (multiple)
Login to [iface: default, target: quallogic:4-52aed6-1570955b2-0fc0018d44851483-<<storagel-server>>-ocr01, portal: <<Iscsi_IP>>,<<Iscsi_Port>>] successful.
[root@<< node-1r>> bin]#