Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

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:

  1. You have shadow passwords (or some other password system) but didn't compile in support for them in smbd.

  2. Your valid users configuration is incorrect.

  3. You have a mixed-case password and you haven't enabled the password level option at a high enough level.

  4. The path line in smb.conf is incorrect. Check it with testparm.

  5. 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):

    1. Fix the nmbd installation.

    2. Add the IP address of BIGSERVER to the wins server box in the advanced TCP/IP setup on the PC.

    3. Enable Windows name resolution via DNS in the advanced section of the TCP/IP setup.

    4. 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”.

  • Samba HowTo Guide
    Prev Home Next

     
     
      Published under the terms fo the GNU General Public License Design by Interspire