Professional Documents
Culture Documents
Port numbers have a range of 0..65535 (although often 0 has special meaning). In the original
BSD TCP implementation, only root can bind to ports 1..1023, and dynamically assigned ports
were assigned from the range 1024..5000; the others were available for unprivileged static
assignment. These days 1024..5000 is often not enough dynamic ports, and IANA has now
officially designated the range 49152..65535 for dynamic port assignment. However even that is
not enough dynamic ports for some busy servers, so the range is usually configurable (by an
administrator). On modern Linux and Solaris systems (often used as servers), the default
dynamic range now starts at 32768. Mac OS X and Windows Vista default to 49152..65535.
65535
Q.What are the Dynamic and/or Private Ports. (Range: 49152 to 65535 )
These ports can’t be registered by IANA. This is used for custom or temporary purposes and for
automatic allocation of short-lived (or ephemeral ) ports which is used internally by
application/processes. You can see these ports by running ‘netstat’ command under “Local
address” column.
ssh -p 22 root@192.168.0.111
22-SSH(For secure remote administration which uses SSL to encrypt the transmission)
68-DHCP
69-TFTP(Trivial file transfer protocol uses udp protocol for connection less transmission of data)
80 -HTTP/WWW(apache)
88-Kerberos
123-NTP(Network time protocol used for time syncing uses UDP protocol)
137-NetBIOS(nmbd)
139,138,445-SMB-Samba(smbd)
143-IMAP
514-Syslogd(udp port)
995-POP3s
3260-ISCSI
3128-squid proxy
631-Printers(cups)
Q. What is NFS?
NFS is a network file system, which allows remote hosts to mount file system over a network
and interact with those file systems as though they are mounted locally.
Q. NFS uses?
NFS is used for sharing files and directories throughout the network.
Q: - What will happened if a space is given in between allowed hosts and (options)
If a space is included, the options are applied to any and all IP addresses, which can be quite
dangerous if write permission is granted.
To retrieve a list of clients connected to the NFS server, use the showmount command
from a shell prompt. To also show the directories the clients are connected to, use the
ex: showmount –e 192.168.0.112
Q: - Name of Configuration file for NFS Server?
/etc/exports
Treat remote root user as local root. Do not map requests from root to the anonymous user and
group ID.
Q: - What is NFS ?
NFS stands for Network File System. NFS was originally developed by Sun Microsystems in the
1980's. NFS allows remote hosts to mount file systems over a network and interact with those file
systems as though they are mounted locally. This enables system administrators to consolidate
resources onto centralized servers on the network.
NFS Version 2
NFS Version 3
NFS Version 4
nfs 2 default 8kb transfer rate,it did not check the authentication at the time connection.client
wants to access unauthorized file it shows error messages like "write error","read error" nfs 3
32kb transfer rate. It check at the time connection- ACL Support
Q: - Which option is used with exportfs command to display the current export list, also displays
the list of export options?
exportfs –v
Q: - 192.168.0.117:/data is exported by NFS Server and i want to add this NFS share to client
/etc/fstab file. How you will add this entry in /etc/fstab file?
#Device name #mount-point # fs-type #options #dump #fsckorder
192.168.0.117:/data /mnt nfs defaults 0 0
Q: - Explain "Soft Mounting" option at NFS Client?
if a file request fails, the NFS client will report an error to the process on the client machine
requesting the file access. if it cannot be satisfied (for example, the server is down), then it quits.
This is called soft mounting.
Q: - What is "portmap"?
The portmapper keeps a list of what services are running on what ports. This list is used by a
connecting machine to see what ports it wants to talk to access certain services.
Q: - I am unable to mount a NFS share. How will you trace out the reason?
Firstly, check that you have permissions to mount nfs share or not. Check /etc/exports file.
Secondly you can get RPC error: Program Not Registered (or another "RPC" error)
For this check your NFS server and portmap service running or not by "rpcinfo -p"
Q: Can I modify export permissions without needing to remount clients in order to have them take
effect?
Yes. The safest thing to do is edit /etc/exports and run "exportfs -r"
SAMBA(SMB server) is a file sharing server. Which is used to share files between Windows,
Linux and Unix Systems. SMB(Server Message Block) is a proprietary protocol which is
developed by Microsoft
Step 1: Create a directory where you want to keep data and share with other remote
systems(either windows/Linux/UNIX).
#mkdir /sample
Step 4 : Now we have to configure the samba server. Edit the main configuration file
(/etc/samba/smb.conf)
#vim /etc/samba/smb.conf
search for workgroup word and specify your work group name
workgroup = SURYA
Now specify the share details, which folder you want to share. To whom you want to share? Goto
last line of the smb.conf file specify your shared folder details as follows.
[linux]
comment = "This is the Sample data which is shared with my windows users"
path = /sample
valid users = suri
writable = no (or) read only=yes
browseable =yes
Public=no
Printable=no
Hostsallow=192.168.0. (network ip of ur domain)
After giving this seven entries just save and exit the file.
You can specify the Read-Only and Write Access to specified using keywords "read only" and
"write list"
Step 5 : Now create passwords for the users who are going to access this samba share
remotely.
#smbpasswd -a suri
generate the passwords for this user and this passwords will be stored in /etc/samba/smbpasswd
Step 6 : check for the syntax for your smb.conf file if in case you did any mistake
#testparm
Step 8 : Permanently on the smb service, So that after rebooting the system too our server will
start running.
#chkconfig smb on
Step 9: To list all Samba users in local machine, use the following command
pdbedit –L
Smb:/>
Q. what is samba?
“Samba is an Open Source/Free Software suite that provides seamless file and print services to
SMB/CIFS clients." Samba is freely available, unlike other SMB/CIFS implementations, and
allows for interoperability between Linux/Unix servers and Windows-based clients.
Q. What is CIFS?
The Common Internet File System (CIFS), also known as Server Message Block (SMB), is a
network protocol whose most common use is sharing files on a Local Area Network (LAN). The
protocol allows a client to manipulate files just as if they were on the local computer. Operations
such as read, write, create, delete, and rename are all supported – the only difference being that
the files are not on the local computer and are actually on a remote server.
Q: Can Samba fully replace my Windows NT server that is not a Primary Domain Controller
(PDC)?
Samba can completely serve files and printers to Windows, just as a Windows NT server would.
Q: What TCP and UDP ports required for NetBIOS over TCP/IP use?
The NBT name service uses port 137/udp, the NBT session service uses port
139/tcp, and the NBT datagram service uses port 138/udp.
Q: If a netbios name is not defined in smb.conf, than what will be netbios name?
If a netbios name is not defined, Samba will use the IP hostname of the server by default.
Q: I want to use User level security for my samba server than what i have to add in smb.conf
file?
security = user
Q: How you will verify that your smb.conf file doesn’t have any mistakes and misspellings?
"testparm " tool that verifies the syntax of a configuration file(smb.conf).
testparm s smb.conf
smbclient L localhost N
Antother use of "smbclient" command to connect the samba share.
smbclient /// -U
Q: Is it possible for Samba to share file systems that have been mounted using NFS?
Yes. However, this can be problematic if the NFS server that provides the file system fails,
causing the Samba server to hang. It is always safer to use Samba to share a local file system.
Q: Can Samba be a member of more than one workgroup at the same time?
No, Samba can be a member of only one workgroup.
Q: What is SWAT?
SWAT is GUI Based administration tool for samba server.
Q: I am trying to use SWAT, but I keep getting the message There was no response. The server
could be down or not responding. What is the problem?
The most likely cause is that SWAT is not listening to connections, or you have used the wrong
URL in trying to connect to SWAT. SWAT usually lives behind port 901, so the URL you should
use ishttp://ID_ADDRESS_OF_SERVER:901/
Q: My clients are getting the error message that the Disk is Full when trying to print to my
Samba server, but there is plenty of space. What is the problem?
If smbd is unable to write the spooled file to the directory defined by the path parameter for a
printer if the write permission were denied, for example it would respond to the client with the
message, Disk is Full. Samba will also return this error message if the amount of free disk space
in the spool directory has fallen below the value specified by the min print space parameter.
Q: When I click on my Samba server in the network neighborhood, I am continually prompted for
a password to the IPC$ share no matter what I enter.
The Windows client is attempting to use encrypted passwords. However, the Samba server is
configured to support only cleartext passwords. You should either enable encrypted passwords
on the server or enable cleartext passwords on the Windows client.