nmblookup is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries. The options allow the name queries to be directed at a particular IP broadcast area or to a particular machine. All queries are done over UDP. The exact sysntax can be seen in the “man” file. A simple example is shown below:
--------------Example----------------------
linuxserver:~ # nmblookup geoff
querying geoff on 192.168.0.255
192.168.0.10 geoff<00>
linuxserver:~ #
-------------Example end-----------------
useradd and passwd
These commands are used to add a user in Linux, you will need to use these commands to get SAMBA to work effectively. You might need to use the “-m” switch to create a “home” directory for the user depending on the version of Linux you use. Once you have created a user with the “useradd” command, you will need to change the user's password with the “passwd” command. This is important, as without this, the users password will be unencrypted and he/she won't be able to log on. See example below.
--------------Example----------------------
[linuxserver/]# useradd -m fred
[linuxserver /]# passwd fred
Changing password for user fred.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[linuxserver/]#
-------------Example end-----------------
smbpasswd
This command is used to create a SAMBA user once a “linux” user has been created. (see useradd and passwd). NB You need to add the same user in both locations, ie /etc/passwd and /etc/samba/smbpasswd . The example below creates a SAMBA log on for “fred”, a user already setup in Linux. you need to use the “-a” and the “-e” option as root to add, then, enable the SAMBA user. More info on the smbpasswd command can be found in the MAN file.