This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages. |
Introduction
Samba is a complex package, because it covers a wide range of use cases and provides lots of different binary packages.
Bugs relating to the samba source package typically fall into one of the following categories:
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
First figure out if the bug falls under one of the generic categories:
- libpam-smbpass related
- winbind related
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='${Package} ${Version} ${Source} ${Status}\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 ?
To test:
- 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
In that case please also provide:
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='${Package} ${Version} ${Source} ${Status}\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='${Package} ${Version} ${Source} ${Status}\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 <version> 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.