Questions and Answers
Questions and Answers
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
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)
*If protocol is not mention then the above port are solely for TCP. Some service use
UDP as mention in above list.
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
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"
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
Requirement : Share a directory /sample with a share name linux throughout the example.com
network to the user suri with the password redhat, and should have only read access
------------------------------------------------------------------------------------
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)
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
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
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.