- Introduction
- How to file
- Samba as a client
- Is it a regression ?
- What version of samba packages are used ?
- How is the remote share accessed from the Ubuntu system?
- If nautilus (or another GUI client) is used to access the remote share, can the share be accessed with the smbclient command line utility ?
- If a cifs mount is used
- What is the remote server ?
- Samba as a server
- Is it a regression ?
- What version of samba packages are used ?
- Which clients are failing to connect?
- What is the error message produced on the client?
- Other information to include
- Install/upgrade failure
- Status of samba packages on the system
- Other information to include
- How to Triage
- Samba as a client
- Stock Reply
- Samba as a client
- Samba as a server
- Install/upgrade failure
- Non-bugs
- Install/upgrade failure due to missing /etc/samba/smb.conf file
- How to recognize it
- Stock answer
- How to tell the version of Samba running
- Check Out These Related posts:
- DESCRIPTION¶
- OPTIONS¶
Introduction
Samba is a complex package, because it covers a wide range of use cases and provides lots of different binary packages.
- User cannot connect to (or properly access files on) a remote share from his Ubuntu system. This falls under the category of samba as a client.
- Other systems cannot connect to (or properly access files on) an Ubuntu system providing samba shares. This may be an issue with samba as a server.
- Install/upgrade failures of the samba packages.
- libpam-smbpass specific issues. Sharing a folder from the GUI installs libpam-smbpass, which stacks a PAM module that maintains sync between system and samba passwords. Failure in libpam-smbpass may result in inability to login on the system.
- winbind specific issues. Winbind allows to get user/group info from a Windows DC. It is sometimes installed by unsuspecting users as a recommended package from Wine.
Also, it is a very good idea to have a look at the official Samba HOWTO. You will find there not only a how-to, but also common errors.
How to file
Samba as a client
Is it a regression ?
Did this use to work properly with a previous release ?
What version of samba packages are used ?
Please give the output of:
dpkg-query -W -f='$ $ $ $\n' | grep samba
How is the remote share accessed from the Ubuntu system?
- nautilus (or other GUI client)
- smbclient (from the command line)
- cifs filesystem mount (from /etc/fstab or a mount command)
If nautilus (or another GUI client) is used to access the remote share, can the share be accessed with the smbclient command line utility ?
- install the samba-client package
- try to connect to the remote system from the command line:
smbclient //remote_system/share_name
If the share requires a specific username/password, try using the «-U» parameter (for example, use «-U ntdomain\\user»).
If a cifs mount is used
- the content of the file /etc/fstab, or the command line used to mount the remote share if the share is manually mounted.
- the content of the file /proc/fs/cifs/DebugData
What is the remote server ?
In all cases, please include the output of the following smbclient command:
smbclient -L //remote_system
This should give us the remote server version. Also include on what kind of machine the share is located (Windows 2003 Server, Ubuntu 8.04, NAS box model. )
Samba as a server
Is it a regression ?
Did this use to work properly with a previous release ?
What version of samba packages are used ?
Please give the output of:
dpkg-query -W -f='$ $ $ $\n' | grep samba
Which clients are failing to connect?
Include the operating system (Windows, Ubuntu) and version (XP, Vista, 8.04) of the client systems failing to connect to the share.
What is the error message produced on the client?
Other information to include
- the content of the /etc/samba/smb.conf file
- log files found in /var/log/samba/
- the output of the smbclient -L //server/
- the output of testparm -s
Install/upgrade failure
Status of samba packages on the system
Please give the output of:
dpkg-query -W -f='$ $ $ $\n' | grep samba
Other information to include
- apt and dpkg log files: /var/log/dpkg.log and /var/log/apt/term.log.
- /etc/samba/smb.conf (or absence thereof)
In the case of an upgrade was there a prompt for a modified configuration file? If so what steps were taken.
How to Triage
Identify if the bug falls in one of the generic categories above. If so make sure that the relevant information is available. If not ask for it using one of the stock replies.
Samba as a client
If nautilus fails to connect but smbclient can successfully connect, the bug is related to nautilus. Mark the samba task Invalid and open a new task for nautilus.
If both nautilus and smbclient can not connect, the bug is related to samba.
If cifs cannot connect the bug might be related to CIFS kernelspace (package linux) or userspace (package samba). In doubt, leave it in samba.
Stock Reply
Samba as a client
Use this reply if an Ubuntu system cannot access a remote samba/windows share.
Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-client.
Samba as a server
Use this reply if remote clients cannot access a share provided by an Ubuntu system.
Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-server.
Install/upgrade failure
Use this reply if there is a package installation/upgrade failure on the Ubuntu system.
Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-pkg-fail.
Non-bugs
Install/upgrade failure due to missing /etc/samba/smb.conf file
How to recognize it
This is a case of install/upgrade failure that results in the following error message (potentially translated):
package samba-common failed to install/upgrade: subprocess post-installation script returned error exit status 1
The DpkgTerminalLog.gz (or /var/log/apt/term.log) contains the following message:
Not replacing deleted config file /etc/samba/smb.conf chmod: cannot access `/etc/samba/smb.conf': No such file or directory
The user should not be able to provide any /etc/samba/smb.conf file, since it is missing.
Stock answer
Thank you for taking the time to report this bug and helping to make Ubuntu better. It looks like you manually removed /etc/samba/smb.conf before reinstalling/upgrading samba packages. Configuration files are special files that should be purged by running "apt-get purge", not manually removed. You can recover from this situation by restoring /etc/samba/smb.conf and restart pending package configuration: $ sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf $ sudo dpkg --configure -a Alternatively, you can purge samba-common completely and attempt the install/upgrade again: $ sudo apt-get purge samba-common This bug will be marked as Invalid: please reopen it if the above steps do not resolve the situation for you. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!
Close the bug report as Invalid.
DebuggingSamba (последним исправлял пользователь pool-71-252-251-234 2010-07-08 22:43:11)
How to tell the version of Samba running
Samba is a free re-implementation of the SMB/CIFS networking protocol which creates a compatible way of sharing files with Windows computers on Linux and BSD computers. This post looks at how to tell which version of samba is running on the server from the command line.
Use the smbstatus command from the command line to show the version, as well as some other useful information:
The first line output from the command is a blank line but the second contains the version number. For example, the second line output from the command on a CentOS 5 machine might look like this:
Samba version 3.0.25b-1.el5_1.4
The smbstatus command also shows who’s currently accessing shares, what shares are available and what files are locked.
Some full example output from the smbstatus command is as follows (I’ve changed the real folder/share names to exampleN):
Samba version 3.0.25b-1.el5_1.4 PID Username Group Machine ------------------------------------------------------------------- 31784 chris chris laptop (192.168.1.177) 2389 chris chris desktop (192.168.1.10) Service pid machine Connected at ------------------------------------------------------- example1 2389 desktop Tue Feb 10 09:30:57 2009 example2 2389 desktop Tue Feb 10 09:30:57 2009 example3 2389 desktop Tue Feb 10 09:30:57 2009 example2 31784 laptop Tue Feb 10 06:41:58 2009 Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name Time -------------------------------------------------------------------------------------------------- 2389 1000 DENY_NONE 0x100001 RDONLY NONE /var/www example/www/images Tue Feb 10 09:38:30 2009 2389 1000 DENY_NONE 0x100001 RDONLY NONE /var/www example/www/images/gui Tue Feb 10 09:38:31 2009
Check Out These Related posts:
DESCRIPTION¶
smbstatus is a very simple program to list the current Samba connections.
OPTIONS¶
If samba has been compiled with the profiling option, print only the contents of the profiling shared memory area.
If samba has been compiled with the profiling option, print the contents of the profiling shared memory area and the call rates.
The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running — it generates a small amount of information about operations carried out.
Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.
Note that specifying this parameter here will override the log level parameter in the smb.conf file.
The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See smb.conf for more information. The default configuration file name is determined at compile time.
Base directory name for log/debug files. The extension «.progname» will be appended (e.g. log.smbclient, log.smbd, etc. ). The log file is never removed by the client.
Set the smb.conf(5) option «» to value «» from the command line. This overrides compiled-in defaults and options read from the configuration file.