Unix Questions & Answers - Part 4

General discussion about Linux, Linux distribution, using Linux etc.

Unix Questions & Answers - Part 4

Postby wacky » Fri Aug 07, 2009 12:48 am

16/ What port numbers do the following use?
ssh, ldap, ftp, smtp, X, named

ssh - tcp 22
ldap - tcp 389/639
ftp - tcp 21
smtp - tcp 25
X - udp 6000+
named - udp 53 ( and tcp 53 for zone transfers)

17/ Using either tar or cpio detail the syntax to copy a directory structure from the /testA filesystem to the /testB filesystem.

cd /testA ; tar -cf - * | ( cd /testB; tar -xf -)

find /testA | cpio -pdm /testB

18/ Why should you never have '.' in root's path?

Trojan horse attacks could be achieved easily. (ie create an 'ls' program that lists the files and then emails the passwd/shadow file to the hacker)

19/ You can ping servers on the subnet your workstation is on, but not other subnets. What is wrong?

There can be 2 reasons for this:
a. Default gateway missing
b. ICMP packets not forwarded by the router

20/ If you can ping a server, but can't telnet or ssh to it, what could be the problem?

There can be a number of reasons for this:
a. ssh/telnet not active
b. tcpwrappers could be blocking your source IP/subnet
c. firewall could be blocking your IP/subnet
wacky
Naik
 
Posts: 94
Joined: Thu Jun 10, 2004 7:42 pm
Location: London, UK

Postby lambda » Fri Aug 07, 2009 8:59 am

named - udp 53 ( and tcp 53 for zone transfers)
dns also uses tcp for data that won't fit into 512 bytes.
Trojan horse attacks could be achieved easily. (ie create an 'ls' program that lists the files and then emails the passwd/shadow file to the hacker)
that's only a problem if the dot is first in the path. if it's at the end, or after the system directories, it's a problem if the attacker creates a file like "sl" or "grpe".
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore


Return to “%s” General

Who is online

Users browsing this forum: No registered users and 1 guest