Table of Contents
This module covers SAMBA and NFS. The objectives state a few specific implementations such as file servers and printer shares.
In the most simple cases, the nmblookup command will associate an IP to a NetBIOS hostname by querying the broadcast.
nmblookup trainer-1 querying trainer-1 on 192.168.3.255 192.168.3.101 trainer-1<00>
One can also specify which broadcast to query with the -M option:
nmblookup trainer-1 -B 192.168.123.255 querying trainer-1 on 192.168.123.255 192.168.123.107 trainer-1<00> 192.168.3.1 trainer-1<00>
Another usage is to query a WINS server directly. If the WINS server is called winserv and the hostname is again trainer-1 the command has the following syntax:
nmblookup -U winserv -R trainer-1 querying trainer-1 on 192.168.123.1 192.168.123.113 trainer-1<00>
The smbpasswd command is used to add users to the samba database (the smbpasswd file by default). Then it is also used to modify existing samba passwords.
![]() | Note |
|---|---|
Only existing UNIX accounts can be added to the samba database |
smbpasswd -a USER | add a samba user |
smbpasswd -e USER | enable a samba user |
smbpasswd -d USER | disable a samba user |
smbclient //HOST/SHARE | Logs onto the specified share |
smbpasswd -L //HOST | List all available shares |
Output of smbstatus
Samba version 2.2.7a-security-rollup-fix Service uid gid pid machine ---------------------------------------------- dean dean dean 3106 trainer-1 (192.168.3.101) Mon Nov 26 13:34:54 2003 IPC$ nobody nogroup 3106 trainer-1 (192.168.3.101) Mon Nov 26 13:34:45 2003 IPC$ nobody nogroup 3106 trainer-1 (192.168.3.101) Mon Nov 26 13:34:53 2003 dean dean dean 3106 trainer-1 (192.168.3.101) Mon Nov 26 13:35:14 2003 netlogon dean dean 3106 trainer-1 (192.168.3.101) Mon Nov 26 13:34:54 2003 public nobody nogroup 3145 drakelap (192.168.3.100) Mon Nov 26 13:35:34 2003 IPC$ nobody nogroup 3106 trainer-1 (192.168.3.101) Mon Nov 26 13:34:54 2003