Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
MongoDB Failed to start lsb an object-document-oriented database
j
December 28, 2018
UBUNTU Files not Opening
j
February 05, 2017
Suddenly My Ubuntu 16.04 LTS giving me a issue, I can't open files manger as well as screenshots app. So I dig into the problem and found this temporary solution for file manager. Still searching for permanent solution. Ubuntu is very buggy since and then, not stable any way.
Step 1:
@jpudasaini:~$ nautilus -q
(nautilus:6210): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:6210): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:6210): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
(nautilus:6210): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(nautilus:6210): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Step 2:
jpudasaini@jpudasaini:~$ nautilus
Nautilus-Share-Message: Called "net usershare info" but it failed: Failed to execute child process "net" (No such file or directory)
Step 1:
@jpudasaini:~$ nautilus -q
(nautilus:6210): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:6210): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:6210): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
(nautilus:6210): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(nautilus:6210): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Step 2:
jpudasaini@jpudasaini:~$ nautilus
Nautilus-Share-Message: Called "net usershare info" but it failed: Failed to execute child process "net" (No such file or directory)
New your file manager is ready to used.
HTH
Tags
# linux
Continue Reading
IOS XR GNS3 QEMU
j
December 05, 2016
This time lets have tutorial on Cisco XR 9k series router image running on the GNS3. Please don't ask for the XR image. Your are smart enough to get it.
My system configuration:
Ubuntu 16.04
GNS3 1.4
RAM 8Gig
i7 processor
Used XR Image
iosxrv-k9-demo-6.0.1.qcow2
This image is VIRL extracted image.
You need to convert this image into QEMU image, follow this link
I strongly recommend you to run it on the Linux system.
Now you have converted image, then go to the GNS3>Edit>Preferences>QEMU>Qemu VMs>New
then follow the onscreen procedure.
Setting for QEMU XR Image.
RAM:- 4Gig
CPU:- 1
My system configuration:
Ubuntu 16.04
GNS3 1.4
RAM 8Gig
i7 processor
Used XR Image
iosxrv-k9-demo-6.0.1.qcow2
This image is VIRL extracted image.
You need to convert this image into QEMU image, follow this link
I strongly recommend you to run it on the Linux system.
Now you have converted image, then go to the GNS3>Edit>Preferences>QEMU>Qemu VMs>New
then follow the onscreen procedure.
Setting for QEMU XR Image.
RAM:- 4Gig
CPU:- 1
Adapters at lest 4.
-enable-kvm
Here you can see I can run the XR on my system. Interface is up and system is already booted.
I have run 3 XR router here is my system RAM CPU usages.
RP/0/0/CPU0:XR3(config)#int gi0/0/0/0
RP/0/0/CPU0:XR3(config-if)#ip add 192.168.13.2 255.255.255.252
RP/0/0/CPU0:XR3(config-if)#commit
RP/0/0/CPU0:XR3#ping 192.168.13.1
Mon Dec 5 14:28:29.088 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.13.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/19 ms
Note: Assign IP on gi0/0/0/0 interface but connect on e1 to e/1 on your router otherwise it will not ping.
Enjoy.
Unit vpnagentd service not loaded.
j
December 01, 2016
Somebody ask me to run Cisco EPIC VPN lab test provide by the Cisco. I just try it done but Anyconnect client doesn't seems to work on ubuntu system. The error message was
How to resolved the issue??
First of all install the following packages.
sudo apt-get install lib32z1 lib32ncurses5
Then try to install the AnyConnect client, if its still show the same error message. Used below command....
sudo apt-get install network-manager-openconnect
Reload the changes using this command....
sudo systemctl daemon-reload
Now AnyConnect should be installed.
Perl Can't Locate in @inc
j
September 04, 2016
Recently I try to install SmokePing (tar ball) on Centos 7, for my company to check Network latency, but same error re-occur.
Multiple Errors:
Then I search a lot, try to install the packages but the problem still appear, then after I found a simple solution.
Solution:
# perl -MCPAN -eshell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.
cpan[1]> install Net::OpenSSH
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 03 Sep 2016 21:53:30 GMT
Running install for module 'Net::OpenSSH'
Running make for S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Fetching with LWP:
http://cpan.communilink.net/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Fetching with LWP:
http://cpan.communilink.net/authors/id/S/SA/SALVA/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN.pm: Building S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Net::OpenSSH
Could not read metadata file. Falling back to other methods to determine prerequisites
cp lib/Net/OpenSSH/ConnectionCache.pm blib/lib/Net/OpenSSH/ConnectionCache.pm
cp lib/Net/OpenSSH/ShellQuoter/fish.pm blib/lib/Net/OpenSSH/ShellQuoter/fish.pm
cp lib/Net/OpenSSH/ShellQuoter.pm blib/lib/Net/OpenSSH/ShellQuoter.pm
cp lib/Net/OpenSSH/ShellQuoter/POSIX.pm blib/lib/Net/OpenSSH/ShellQuoter/POSIX.pm
cp lib/Net/OpenSSH/ModuleLoader.pm blib/lib/Net/OpenSSH/ModuleLoader.pm
cp lib/Net/OpenSSH/ShellQuoter/Chain.pm blib/lib/Net/OpenSSH/ShellQuoter/Chain.pm
cp lib/Net/OpenSSH/SSH.pm blib/lib/Net/OpenSSH/SSH.pm
cp lib/Net/OpenSSH/Constants.pm blib/lib/Net/OpenSSH/Constants.pm
cp lib/Net/OpenSSH/ShellQuoter/MSWin.pm blib/lib/Net/OpenSSH/ShellQuoter/MSWin.pm
cp lib/Net/OpenSSH/OSTracer.pm blib/lib/Net/OpenSSH/OSTracer.pm
cp lib/Net/OpenSSH.pm blib/lib/Net/OpenSSH.pm
cp lib/Net/OpenSSH/ShellQuoter/MSCmd.pm blib/lib/Net/OpenSSH/ShellQuoter/MSCmd.pm
cp lib/Net/OpenSSH/ShellQuoter/csh.pm blib/lib/Net/OpenSSH/ShellQuoter/csh.pm
cp lib/Net/OpenSSH/ObjectRemote.pm blib/lib/Net/OpenSSH/ObjectRemote.pm
Manifying blib/man3/Net::OpenSSH::SSH.3pm
Manifying blib/man3/Net::OpenSSH::Constants.3pm
Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSWin.3pm
Manifying blib/man3/Net::OpenSSH::ConnectionCache.3pm
Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSCmd.3pm
Manifying blib/man3/Net::OpenSSH.3pm
Manifying blib/man3/Net::OpenSSH::OSTracer.3pm
SALVA/Net-OpenSSH-0.73.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/1_run.t .... #
# SSH client found: OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013.
# Trying to connect to localhost, timeout is 15s.
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
root@localhost's password:
t/1_run.t .... ok
t/quoting.t .. # unable to exec csh -c echo good
# unable to exec tcsh -c echo good
# unable to exec ksh -c echo good
# unable to exec dash -c echo good
# unable to exec ash -c echo good
# unable to exec pdksh -c echo good
# unable to exec mksh -c echo good
# unable to exec zsh -c echo good
# unable to exec fish -c echo good
# running tests for shells sh bash
t/quoting.t .. ok
t/uri.t ...... ok
All tests successful.
Files=3, Tests=471, 16 wallclock secs ( 0.17 usr 0.01 sys + 1.63 cusr 1.06 csys = 2.87 CPU)
Result: PASS
SALVA/Net-OpenSSH-0.73.tar.gz
/usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl5/Net/OpenSSH.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ConnectionCache.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ModuleLoader.pm
Installing /usr/local/share/perl5/Net/OpenSSH/SSH.pm
Installing /usr/local/share/perl5/Net/OpenSSH/Constants.pm
Installing /usr/local/share/perl5/Net/OpenSSH/OSTracer.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ObjectRemote.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/fish.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/POSIX.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/Chain.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/MSWin.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/MSCmd.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/csh.pm
Installing /usr/local/share/man/man3/Net::OpenSSH::SSH.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::Constants.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ShellQuoter::MSWin.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ConnectionCache.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ShellQuoter::MSCmd.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::OSTracer.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
SALVA/Net-OpenSSH-0.73.tar.gz
/usr/bin/make install -- OK
Multiple Errors:
Then I search a lot, try to install the packages but the problem still appear, then after I found a simple solution.
Solution:
# perl -MCPAN -eshell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.
cpan[1]> install Net::OpenSSH
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 03 Sep 2016 21:53:30 GMT
Running install for module 'Net::OpenSSH'
Running make for S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Fetching with LWP:
http://cpan.communilink.net/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Fetching with LWP:
http://cpan.communilink.net/authors/id/S/SA/SALVA/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN.pm: Building S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Net::OpenSSH
Could not read metadata file. Falling back to other methods to determine prerequisites
cp lib/Net/OpenSSH/ConnectionCache.pm blib/lib/Net/OpenSSH/ConnectionCache.pm
cp lib/Net/OpenSSH/ShellQuoter/fish.pm blib/lib/Net/OpenSSH/ShellQuoter/fish.pm
cp lib/Net/OpenSSH/ShellQuoter.pm blib/lib/Net/OpenSSH/ShellQuoter.pm
cp lib/Net/OpenSSH/ShellQuoter/POSIX.pm blib/lib/Net/OpenSSH/ShellQuoter/POSIX.pm
cp lib/Net/OpenSSH/ModuleLoader.pm blib/lib/Net/OpenSSH/ModuleLoader.pm
cp lib/Net/OpenSSH/ShellQuoter/Chain.pm blib/lib/Net/OpenSSH/ShellQuoter/Chain.pm
cp lib/Net/OpenSSH/SSH.pm blib/lib/Net/OpenSSH/SSH.pm
cp lib/Net/OpenSSH/Constants.pm blib/lib/Net/OpenSSH/Constants.pm
cp lib/Net/OpenSSH/ShellQuoter/MSWin.pm blib/lib/Net/OpenSSH/ShellQuoter/MSWin.pm
cp lib/Net/OpenSSH/OSTracer.pm blib/lib/Net/OpenSSH/OSTracer.pm
cp lib/Net/OpenSSH.pm blib/lib/Net/OpenSSH.pm
cp lib/Net/OpenSSH/ShellQuoter/MSCmd.pm blib/lib/Net/OpenSSH/ShellQuoter/MSCmd.pm
cp lib/Net/OpenSSH/ShellQuoter/csh.pm blib/lib/Net/OpenSSH/ShellQuoter/csh.pm
cp lib/Net/OpenSSH/ObjectRemote.pm blib/lib/Net/OpenSSH/ObjectRemote.pm
Manifying blib/man3/Net::OpenSSH::SSH.3pm
Manifying blib/man3/Net::OpenSSH::Constants.3pm
Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSWin.3pm
Manifying blib/man3/Net::OpenSSH::ConnectionCache.3pm
Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSCmd.3pm
Manifying blib/man3/Net::OpenSSH.3pm
Manifying blib/man3/Net::OpenSSH::OSTracer.3pm
SALVA/Net-OpenSSH-0.73.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/1_run.t .... #
# SSH client found: OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013.
# Trying to connect to localhost, timeout is 15s.
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
root@localhost's password:
t/1_run.t .... ok
t/quoting.t .. # unable to exec csh -c echo good
# unable to exec tcsh -c echo good
# unable to exec ksh -c echo good
# unable to exec dash -c echo good
# unable to exec ash -c echo good
# unable to exec pdksh -c echo good
# unable to exec mksh -c echo good
# unable to exec zsh -c echo good
# unable to exec fish -c echo good
# running tests for shells sh bash
t/quoting.t .. ok
t/uri.t ...... ok
All tests successful.
Files=3, Tests=471, 16 wallclock secs ( 0.17 usr 0.01 sys + 1.63 cusr 1.06 csys = 2.87 CPU)
Result: PASS
SALVA/Net-OpenSSH-0.73.tar.gz
/usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl5/Net/OpenSSH.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ConnectionCache.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ModuleLoader.pm
Installing /usr/local/share/perl5/Net/OpenSSH/SSH.pm
Installing /usr/local/share/perl5/Net/OpenSSH/Constants.pm
Installing /usr/local/share/perl5/Net/OpenSSH/OSTracer.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ObjectRemote.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/fish.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/POSIX.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/Chain.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/MSWin.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/MSCmd.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/csh.pm
Installing /usr/local/share/man/man3/Net::OpenSSH::SSH.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::Constants.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ShellQuoter::MSWin.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ConnectionCache.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ShellQuoter::MSCmd.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::OSTracer.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
SALVA/Net-OpenSSH-0.73.tar.gz
/usr/bin/make install -- OK
No Matching Host Key Type Found. Their Offer: ssh-rsa
j
May 26, 2016
After upgrading the Laptop OS when I try to login to my old machine I got this error message....
jay@jay:~$ ssh -p 2222 jay@jpudasaini.com.np
Unable to negotiate with 192.168.156.101 port 2222: no matching host key type found. Their offer: ssh-dss
I can't access the system, here is the solution
jay@jay:~$ ssh -oHostKeyAlgorithms=+ssh-dss -p 2222 jay@jpudasaini.com.npThe authenticity of host '[jpudasaini.com.np]:2222 ([192.168.156.101]:2222)' can't be established.
DSA key fingerprint is SHA256:J#$/zFpzr05gdfrshufHHOQvss6NQcEpPMgKlibTc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[jpudasaini.com.np]:2222,[192.168.156.101]:2222' (DSA) to the list of known hosts.
Password:
jay@jay:~$ ssh -p 2222 jay@jpudasaini.com.np
Unable to negotiate with 192.168.156.101 port 2222: no matching host key type found. Their offer: ssh-dss
I can't access the system, here is the solution
jay@jay:~$ ssh -oHostKeyAlgorithms=+ssh-dss -p 2222 jay@jpudasaini.com.npThe authenticity of host '[jpudasaini.com.np]:2222 ([192.168.156.101]:2222)' can't be established.
DSA key fingerprint is SHA256:J#$/zFpzr05gdfrshufHHOQvss6NQcEpPMgKlibTc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[jpudasaini.com.np]:2222,[192.168.156.101]:2222' (DSA) to the list of known hosts.
Password:
Now Just type the password
Tags
# linux
Continue Reading
nslookup Command
j
March 21, 2016
A Network Administrator command which help diagnosis DNS related issue. However to understand this, you should better to know how DNS works.
How to troubleshoot DNS related issue.
1. NSLOOKUP example display "A Record" (IP Adress) of the domain
C:\Users\jpudasaini>nslookup jpudasaini.com.np 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
Name: jpudasaini.com.np
Address: 216.239.32.21
A Non-Authoritative Answer is a response from Cache. A DNS server is
authoritative for zones actually holds it.
The above output shows "A Records" (IP Adress) of the domain
"jpudasaini.com.np". Which is actually query to the public Google DNS. If
you don't put DNS after the domain, it will used your default DNS, in my
case I have used public DNS.
2. MX Record using -query=mx
MX (Mail Exchange) record maps for the specific domain name to verify mail
exchaing servers on that domain.
C:\Users\jpudasaini>nslookup -query=mx gmail.com 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
gmail.com MX preference = 40, mail exchanger =alt4.gmail-smtp-in.l.google
.com
gmail.com MX preference = 20, mail exchanger =alt2.gmail-smtp-in.l.google
.com
gmail.com MX preference = 10, mail exchanger =alt1.gmail-smtp-in.l.google
.com
gmail.com MX preference = 30, mail exchanger =alt3.gmail-smtp-in.l.google
.com
gmail.com MX preference = 5, mail exchanger =gmail-smtp-in.l.google.com
From the above example we can say that 4 MX records used for gmail
domain, the number associat with mx reference the preference of mail
server. Lower the number, higher the preference. So
gmail-smtp-in.l.google.com is the first server which received the mail at
first.
3. NS Record using -query=ns
NS (Name Server) records maps a domain to a list of DNS servers
authoritative for that domain. Here is example of name server which are
associated with jpudasaini.com.np doamain.
C:\Users\jpudasaini>nslookup -query=ns jpudasaini.com.np 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
jpudasaini.com.np nameserver = ns4.afraid.org
jpudasaini.com.np nameserver = ns2.afraid.org
jpudasaini.com.np nameserver = ns1.afraid.org
4. SOA Record using -query=soa
C:\Users\jpudasaini>nslookup -query=soa jpudasaini.com.np 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
jpudasaini.com.np
primary name server = ns1.afraid.org
responsible mail addr = dnsadmin.afraid.org
serial = 1511030001
refresh = 86400 (1 day)
retry = 7200 (2 hours)
expire = 2419200 (28 days)
default TTL = 3600 (1 hour)
SOA record (start of authority) which provides the authoritative
information, as well as e-mail address, serial no of the respective
domain.
5. Reserve DNS lookup
The reverse DNS look-up using IP Adress as argument to nslookup
C:\Users\jpudasaini>nslookup 216.239.32.21 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Name: any-in-2015.1e100.net
Address: 216.239.32.21
6. Using Specific DNS Server
Make query using particular name server instead of using default DNS server.
C:\Users\jpudasaini>nslookup jpudasaini.com.np ns1.afraid.org
Server: UnKnown
Address: 50.23.197.95
Name: jpudasaini.com.np
Address: 216.239.32.21
How to troubleshoot DNS related issue.
1. NSLOOKUP example display "A Record" (IP Adress) of the domain
C:\Users\jpudasaini>nslookup jpudasaini.com.np 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
Name: jpudasaini.com.np
Address: 216.239.32.21
A Non-Authoritative Answer is a response from Cache. A DNS server is
authoritative for zones actually holds it.
The above output shows "A Records" (IP Adress) of the domain
"jpudasaini.com.np". Which is actually query to the public Google DNS. If
you don't put DNS after the domain, it will used your default DNS, in my
case I have used public DNS.
2. MX Record using -query=mx
MX (Mail Exchange) record maps for the specific domain name to verify mail
exchaing servers on that domain.
C:\Users\jpudasaini>nslookup -query=mx gmail.com 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
gmail.com MX preference = 40, mail exchanger =alt4.gmail-smtp-in.l.google
.com
gmail.com MX preference = 20, mail exchanger =alt2.gmail-smtp-in.l.google
.com
gmail.com MX preference = 10, mail exchanger =alt1.gmail-smtp-in.l.google
.com
gmail.com MX preference = 30, mail exchanger =alt3.gmail-smtp-in.l.google
.com
gmail.com MX preference = 5, mail exchanger =gmail-smtp-in.l.google.com
From the above example we can say that 4 MX records used for gmail
domain, the number associat with mx reference the preference of mail
server. Lower the number, higher the preference. So
gmail-smtp-in.l.google.com is the first server which received the mail at
first.
3. NS Record using -query=ns
NS (Name Server) records maps a domain to a list of DNS servers
authoritative for that domain. Here is example of name server which are
associated with jpudasaini.com.np doamain.
C:\Users\jpudasaini>nslookup -query=ns jpudasaini.com.np 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
jpudasaini.com.np nameserver = ns4.afraid.org
jpudasaini.com.np nameserver = ns2.afraid.org
jpudasaini.com.np nameserver = ns1.afraid.org
4. SOA Record using -query=soa
C:\Users\jpudasaini>nslookup -query=soa jpudasaini.com.np 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
jpudasaini.com.np
primary name server = ns1.afraid.org
responsible mail addr = dnsadmin.afraid.org
serial = 1511030001
refresh = 86400 (1 day)
retry = 7200 (2 hours)
expire = 2419200 (28 days)
default TTL = 3600 (1 hour)
SOA record (start of authority) which provides the authoritative
information, as well as e-mail address, serial no of the respective
domain.
5. Reserve DNS lookup
The reverse DNS look-up using IP Adress as argument to nslookup
C:\Users\jpudasaini>nslookup 216.239.32.21 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Name: any-in-2015.1e100.net
Address: 216.239.32.21
6. Using Specific DNS Server
Make query using particular name server instead of using default DNS server.
C:\Users\jpudasaini>nslookup jpudasaini.com.np ns1.afraid.org
Server: UnKnown
Address: 50.23.197.95
Name: jpudasaini.com.np
Address: 216.239.32.21
Everything goes well while installing the Nagios 4.0.8 into Ubuntu 10.04 LTS. However Nagios Map section doesn't plotted the maps of the device. Displayed error like this way
G for god and G for google, found the solution like
Install the package
apt-get install libgd2-xpm install libgd2-xpm-dev
cd /home/jpudasaini/nagios-4.0.8/
Configure the package for installation
./configure -with-gd-lib=/usr/local/lib/
make cgis
Then copy it into the sbin directory
cp /home/jpudasaini/nagios-4.0.8/cgi/*.cgi /usr/local/nagios/sbin/
Change the permission for that files.
chown nagios:nagios /usr/local/nagios/sbin/*.cgi
Tags
# linux
Continue Reading
vSphere Client Displays Empty Inventory
j
May 27, 2015
Suddenly my home datacenter vsphere lab show empty inventory in vSphere client. There was no any host at all. I have three ( Cisco IOU, CentOS 7, Ubuntu server) host configure for lab purpose. So I must recover those host to complete my lab because I almost completed all labs. Thus here is process how to retrieve those lost host from vSphere client in vSphere 6 database.
Step 1:
Login to the vSphere client choose your database from Configuration Tab > right click database and choose "Browse Dababase".
Step 1:
Login to the vSphere client choose your database from Configuration Tab > right click database and choose "Browse Dababase".
Step 2: Now next window open the database page. From here open your host folder then choose ".vmx" right click and choose "Add to inventory" then follow the onscreen instruction.
Next window
Select the database
Next click to finish
Now your server is in the inventory list, you can run the server. In my case its my CentOS 7 server, it will run smoothly.
Table Already Exists SQL Server
j
May 27, 2015
Somehow I have created or you can say I have imported database into SQL and try to continue installation, but error "table already exists sql server" occur then installation has been interrupted. Meanwhile, another error "SQL=Duplicate entry 'add_user' for key 'PRIMARY':" also appear. In this case I had deleted those tables and modified dbsetup file.
CREATE TABLE logs (
id bigint unsigned NOT NULL AUTO_INCREMENT,
to
CREATE TABLE logs (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
On sql I have used this command to delete tables
MariaDB [(none)]> use syslog
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [syslog]> drop table {YourTableName};
Tags
# linux
Continue Reading
PERL can't locate module in @ INC
j
April 24, 2015
Hi, recently when I'm trying to install some linux daemon in CentOS 7 I have encountered a PERL issue, indicating that some module are missing e.g.
Can't locate sys/syslog.pm in @INC
It means it can't find the pear-sys-syslog. So I have to install this daemon to continue my installation. In my case its syslog.pm but you may encounter different than this. I mean the module name is different, but the error code is same. You need to search that package and install it. In my case I have just used this module
root@localhost#yum install -y perl-sys-syslog
Now the installation has been working.
Can't locate sys/syslog.pm in @INC
It means it can't find the pear-sys-syslog. So I have to install this daemon to continue my installation. In my case its syslog.pm but you may encounter different than this. I mean the module name is different, but the error code is same. You need to search that package and install it. In my case I have just used this module
root@localhost#yum install -y perl-sys-syslog
Now the installation has been working.
Tags
# linux
Continue Reading
PEAR Succeeded but it is not a valid package archive
j
April 21, 2015
Recently I encounter following problem while installing PEAR in Ubuntu 14.04 server, after long search I found that, it is a bug already reported a long before. Solution at bottom of the page.
Solution: Edit /usr/share/php/Archive/Tar.php find and replace the following 'gzopen' with gzopen64' and 'gzseek' with gzseek64'
root@dns:~# pear install DB
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/Console_Getopt" is deprecated in favor of "pear/Console_GetoptPlus"
downloading DB-1.8.2.tgz ...
Starting to download DB-1.8.2.tgz (131,693 bytes)
.............................done: 131,693 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/DB-1.8.2.tgz"
Download of "pear/DB" succeeded, but it is not a valid package archive
Error: cannot download "pear/DB"
downloading PEAR-1.9.5.tgz ...
Starting to download PEAR-1.9.5.tgz (290,006 bytes)
...done: 290,006 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/PEAR-1.9.5.tgz"
Download of "pear/PEAR" succeeded, but it is not a valid package archive
Error: cannot download "pear/PEAR"
downloading Archive_Tar-1.3.16.tgz ...
Starting to download Archive_Tar-1.3.16.tgz (20,024 bytes)
...done: 20,024 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/Archive_Tar-1.3.16.tgz"
Download of "pear/Archive_Tar" succeeded, but it is not a valid package archive
Error: cannot download "pear/Archive_Tar"
downloading Console_Getopt-1.4.0.tgz ...
Starting to download Console_Getopt-1.4.0.tgz (4,534 bytes)
...done: 4,534 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/Console_Getopt-1.4.0.tgz"
Download of "pear/Console_Getopt" succeeded, but it is not a valid package archive
Error: cannot download "pear/Console_Getopt"
downloading XML_Util-1.2.3.tgz ...
Starting to download XML_Util-1.2.3.tgz (17,134 bytes)
...done: 17,134 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/XML_Util-1.2.3.tgz"
Download of "pear/XML_Util" succeeded, but it is not a valid package archive
Error: cannot download "pear/XML_Util"
Download failed
install failed
Solution: Edit /usr/share/php/Archive/Tar.php find and replace the following 'gzopen' with gzopen64' and 'gzseek' with gzseek64'
Tags
# linux
Continue Reading
Host Key Verification Failed
j
May 21, 2014
Most of the time we may encounter following error. Such a error may occur if remote host may change or regenerated the RSA key. So how to solved the issue.
Delete line 17 form opened file or
This will delete line 17 in the /ssh/known_hosts file
Now you retry to login to the remote host. Accept new key and ready to go.
jpudasaini@Gnome:~/Downloads$ ssh root@10.0.2.37
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
f3:30:b1:66:ea:0d:e4:06:2e:10:8b:ca:df:33:fa:34.
Please contact your system administrator.
Add correct host key in /home/jpudasaini/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/jpudasaini/.ssh/known_hosts:17
remove with: ssh-keygen -f "/home/jpudasaini/.ssh/known_hosts" -R 10.0.2.37
ECDSA host key for 10.0.2.37 has changed and you have requested strict checking.
Host key verification failed.
This error will happen due to the remote host change the host key.
ssh-keygen -R 10.0.2.37
jpudasaini@Gnome:~$ cd /home/jpudasaini/.ssh/
jpudasaini@Gnome:~/.ssh$ ls
known_hosts known_hosts.old
jpudasaini@Gnome:~/.ssh$ sudo vi known_hosts
[sudo] password for jpudasaini: (type your password)
Delete line 17 form opened file or
jpudasaini@Gnome:~$sed -i 17d ~/ssh/known_hosts
This will delete line 17 in the /ssh/known_hosts file
Now you retry to login to the remote host. Accept new key and ready to go.
Tags
# linux
Continue Reading
Ubuntu Password Reset
j
February 18, 2014
Often I've forgotten Ubuntu password, this is the most occurring issue with me. Every-time I have to search Google how to reset the password on Ubuntu. So I decide to make notes for myself.
Here is the step how I reset the password.
First of all reboot Ubuntu and choose recovery mode from console. After that you may see "Recovery menu", just choose "root Drop to root shell prompt".
Now you are in a shell prompt, then use following command to change the password.
#ls /home (this will show your home directory's username)
#mount -rw -o remount /
#passwd (username)
Enter new UNIX password:
Retype new UNIX password:
passwd Password updated successfully
#reboot
After wards you can use new password to login to ubuntu. Tested in Ubuntu server 14.04.
Linux Tools to see What Process consume Bandwidth
j
January 09, 2014
I have to day to day network troubleshoot and I need such a tool which shows what program consume the network bandwidth. So the Nethogs tool is small net top tool which fit exactly under my requirements. Here is the process to install and use of the tool.
The tool monitors traffic going to and from a machine, by per process basis.
jpudasaini@jpudasaini:~$ sudo apt-get install nethogs
*****Output*******
#sudo nethogs
#sudo nethogs eth0
The tool monitors traffic going to and from a machine, by per process basis.
jpudasaini@jpudasaini:~$ sudo apt-get install nethogs
*****Output*******
[sudo] password for jpudasaini:You have install the tool. How to use the tool.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
kde-l10n-engb linux-image-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
nethogs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.3 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 http://np.archive.ubuntu.com/ubuntu/ saucy/universe nethogs amd64 0.8.0-1 [28.3 kB]
Fetched 28.3 kB in 0s (50.1 kB/s)
Selecting previously unselected package nethogs.
(Reading database ... 230384 files and directories currently installed.)
Unpacking nethogs (from .../nethogs_0.8.0-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up nethogs (0.8.0-1) ...
#sudo nethogs
#sudo nethogs eth0
Tags
# linux
Continue Reading
Powerpoint Problem on Linux
j
November 12, 2013
I like Some features of Microsoft office, so I install office 2007 into kali linux. Everything work perfect but when I try to run power-point, it never run. Then I search for fixed and found one solution. This trick has been posted in ubuntuforum and works perfect to me.
Step 1. Got the Application>System tool>Wine configuration
Setp 2. Under Library tab Add these two overrides "riched20" and "usp10".
Setp 3. Apply and ok.
Now you can run the power-point with out error.
Tags
# linux
Continue Reading
Install MS office Kali Linux
j
November 12, 2013
Dear reader, you may think Why I install MS office rather than LibreOffice because I really like some feature on MS Office. Lets start to install MS office in Kali Linux or any other linux distro. For this I'm going to use wine.
In this blog post I install MS Office under kali linux, kali linux have wine installed by default. If you are going to install MS Office other than Kali Linux you may have to install WINE first.
Insert your MS Office disk into DVD drive or mount your image under any linux. After that just open setup.exe with wine.
Now your setup is began. Then you can type your product key.
Chose your installation option.
Finally you got install MS Office under linux distro.
Enjoy !
Tags
# linux
Continue Reading
WINEon64Bit Kali Linux
j
October 22, 2013
When I install kali 1.0.5 amd64 then I realize WINE is not working at all, I tried to apt-get purge wine and re-install it, but still there is no sign of wine . So here the process which make WINE worked under amd64 kali linux.
This command works under other Linux as well.
Please note their no WINE icon under Application>system. After following below setups you can see WINE configuration ICON and run windows program.
root@kali:~# dpkg --add-architecture i386
root@kali:~# apt-get update
root@kali:~# root@kali:~# apt-get install wine-bin:i386
####output####
Need to get 77.6 MB of archives.
After this operation, 233 MB of additional disk space will be used.
Do you want to continue [Y/n]? yes
####output omitted#####
Wait for packages to install.
Now you can run windows program.
Tags
# linux
Continue Reading
Remove Old Kernel packages Debian linux
j
October 17, 2013
Removing old kernels in Linux can be beneficial for several reasons:
Overall, removing old kernels helps maintain a clean, efficient, and secure Linux system.
- Free Up Disk Space: Each kernel version, along with its associated modules and headers, takes up disk space. Over time, multiple kernel versions can accumulate and consume a significant amount of storage. Removing old kernels helps free up valuable disk space.
- Clean Boot Menu: When you have multiple kernel versions installed, each one appears as an option in the boot menu. This can clutter the menu and make it harder to select the desired kernel. Removing old kernels simplifies the boot menu, making it easier to manage.
- Simplify System Maintenance: Managing fewer kernels can make system maintenance and updates easier. It reduces the complexity of keeping track of which kernels are installed and ensures that you are using the most up-to-date and secure versions1.
- Improve Security: Older kernels may contain vulnerabilities that have been patched in newer versions. By removing old kernels and keeping your system updated with the latest kernel releases, you ensure that security patches are applied promptly, reducing the risk of exploitation.
- Enhance Performance: Although old kernels don't directly affect running performance, having a streamlined system with fewer kernels can improve boot times and overall system efficiency.
Overall, removing old kernels helps maintain a clean, efficient, and secure Linux system.
root@kali:~# dpkg --purge linux-image-xxxx
Remove xxxx with your image version, revision number
Remove xxxx with your image version, revision number
Send email using Telnet
j
August 25, 2013
How to send email through Telnet.
You can use it for troubleshoot purpose when sometime outgoing issue from the mail server.
1. First open the Command prompt. ctrl+r, now type "cmd".
before that you have to enable telnet service from control panel>program and feautre>Turn windows features on or off> now choose telnet client
2. Now, connect with telnet command just type
telnet mail.yourdomain.com 25
3. From the picture, you already enter into the server now use following command
helo mail.yourdomain.com
4. type mail from username, see on screenshots
mail from: username@yourdomain.com
5. Type receiver ID here, see screenshot.
rcpt to: yourfriend@hotmail.com, yourfriend@yahoo.com
6. To add message just use "data" command and type "subject" command. At the end don't forget to add "." to end the message and press enter.
data
subject: this is test email
hello,
This is jpudasaini.com.np, the portal where you can hangout for tutorial on the job training.
Regards
jpudasaini.com.np
.
7 Type quit to exit.
You can use it for troubleshoot purpose when sometime outgoing issue from the mail server.
1. First open the Command prompt. ctrl+r, now type "cmd".
before that you have to enable telnet service from control panel>program and feautre>Turn windows features on or off> now choose telnet client
2. Now, connect with telnet command just type
telnet mail.yourdomain.com 25
3. From the picture, you already enter into the server now use following command
helo mail.yourdomain.com
4. type mail from username, see on screenshots
mail from: username@yourdomain.com
5. Type receiver ID here, see screenshot.
rcpt to: yourfriend@hotmail.com, yourfriend@yahoo.com
6. To add message just use "data" command and type "subject" command. At the end don't forget to add "." to end the message and press enter.
subject: this is test email
hello,
This is jpudasaini.com.np, the portal where you can hangout for tutorial on the job training.
Regards
jpudasaini.com.np
.
7 Type quit to exit.