Note
It is possible to specify the password along with the username as follows:
smbclient //bigserver/tmp -Ujohndoe%secret
.
Once you enter the password, you should get the smb> prompt. If you
do not, then look at the error message. If it says “
invalid network
name,
” then the service
tmp
is not correctly set up in your smb.conf .
If it says “
bad password,
” then the likely causes are:
-
You have shadow passwords (or some other password system) but didn't
compile in support for them in smbd.
-
Your
valid users configuration is incorrect.
-
You have a mixed-case password and you haven't enabled the
password level option at a high enough level.
-
The
path line in smb.conf is incorrect. Check it with testparm.
-
You enabled password encryption but didn't map UNIX to Samba users. Run
smbpasswd -a username
Once connected, you should be able to use the commands
dir
,
get
,
put
, and so on. Type
help command
for instructions. You should
especially check that the amount of free disk space shown is correct when you type
dir
.
On the PC, type the command
net view \\BIGSERVER
. You will
need to do this from within a DOS prompt window. You should get back a
list of shares available on the server.
If you get a message network name not found or similar error, then NetBIOS
name resolution is not working. This is usually caused by a problem in
nmbd
.
To overcome it, you could do one of the following (you only need to choose one of them):
-
Fix the nmbd installation.
-
Add the IP address of BIGSERVER to the
wins server
box in the
advanced TCP/IP setup on the PC.
-
Enable Windows name resolution via DNS in the advanced section of the TCP/IP setup.
-
Add BIGSERVER to your lmhosts file on the PC.
If you get a message “
invalid network name
” or
“
bad password error,
” then apply the
same fixes as for the
smbclient -L
test. In
particular, make sure your
hosts allow
line is correct (see the man pages).
Also, do not overlook that fact that when the workstation requests the
connection to the Samba server, it will attempt to connect using the
name with which you logged onto your Windows machine. You need to make
sure that an account exists on your Samba server with that exact same
name and password.
If you get a message “
specified computer is not receiving requests
” or similar error,
it probably means that the host is not contactable via TCP services.
Check to see if the host is running TCP wrappers, and if so, add an entry in
the hosts.allow file for your client (or subnet, and so on.)
Run the command
net use x: \\BIGSERVER\TMP
. You should
be prompted for a password, then you should get a command completed
successfully message. If not, then your PC software is incorrectly
installed or your smb.conf is incorrect. Make sure your
hosts allow
and other config lines in smb.conf are correct.
It's also possible that the server can't work out what username to connect you as.
To see if this is the problem, add the line
user = username to the
[tmp]
section of
smb.conf where
username
is the
username corresponding to the password you typed. If you find this
fixes things, you may need the username mapping option.
It might also be the case that your client only sends encrypted passwords
and you have
encrypt passwords = no in smb.conf .
Change this setting to `yes' to fix this.
Run the command
nmblookup -M
testgroup
where
testgroup
is the name of the workgroup that your Samba server and
Windows PCs belong to. You should get back the IP address of the
master browser for that workgroup.
If you do not, then the election process has failed. Wait a minute to
see if it is just being slow, then try again. If it still fails after
that, then look at the browsing options you have set in smb.conf . Make
sure you have
preferred master = yes to ensure that
an election is held at startup.
From file manager, try to browse the server. Your Samba server should
appear in the browse list of your local workgroup (or the one you
specified in smb.conf ). You should be able to double-click on the name
of the server and get a list of shares. If you get the error message “invalid password,”
you are probably running Windows NT and it
is refusing to browse a server that has no encrypted password
capability and is in user-level security mode. In this case, either set
security = server and
password server = Windows_NT_Machine in your
smb.conf file or make sure
encrypt passwords is
set to “yes”.
|