Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Samba Install Problems

Fri Aug 02, 2013 10:21 pm

Hi,
Can anyone help with a problem I have spent many hours trying unsuccessfully to resolve?

I was trying to add Samba to my Raspbian distro (I think in hindsight it was already installed). I was reading an article about accessing a RasbPi external drive from my Win 7 laptop. The article said to do the following:
sudo apt-get install samba samba-common samba-common-bin winbind

This reported the following:

Code: Select all

Reading package lists... Done
Building dependency tree
Reading state information... Done
samba-common is already the newest version.
samba-common-bin is already the newest version.
winbind is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
9 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up winbind (2:3.6.6-6) ...
insserv: script tightvncserver.save.1: service vncserver already provided!
insserv: warning: script 'tightvncserver.save.2' missing LSB tags and overrides
insserv: There is a loop between service rpc_shellinaboxd and tightvncserver.save.2 if stopped
insserv:  loop involving service tightvncserver.save.2 at depth 2
insserv:  loop involving service rpc_shellinaboxd at depth 1
insserv: Stopping tightvncserver.save.2 depends on rpc_shellinaboxd and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing winbind (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libnss-winbind:armhf:
 libnss-winbind:armhf depends on winbind (= 2:3.6.6-6); however:
  Package winbind is not configured yet.

dpkg: error processing libnss-winbind:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-winbind:armhf:
 libpam-winbind:armhf depends on winbind (= 2:3.6.6-6); however:
  Package winbind is not configured yet.

dpkg: error processing libpam-winbind:armhf (--configure):
 dependency problems - leaving unconfigured
Setting up dbus (1.6.8-1+deb7u1) ...
insserv: script tightvncserver.save.1: service vncserver already provided!
insserv: warning: script 'tightvncserver.save.2' missing LSB tags and overrides
insserv: There is a loop between service rpc_shellinaboxd and tightvncserver.save.2 if stopped
insserv:  loop involving service tightvncserver.save.2 at depth 2
insserv:  loop involving service rpc_shellinaboxd at depth 1
insserv: Stopping tightvncserver.save.2 depends on rpc_shellinaboxd and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of dbus-x11:
 dbus-x11 depends on dbus; however:
  Package dbus is not configured yet.

dpkg: error processing dbus-x11 (--configure):
 dependency problems - leaving unconfigured
Setting up x11-common (1:7.7+3~deb7u1) ...
insserv: script tightvncserver.save.1: service vncserver already provided!
insserv: warning: script 'tightvncserver.save.2' missing LSB tags and overrides
insserv: There is a loop between service rpc_shellinaboxd and tightvncserver.save.2 if stopped
insserv:  loop involving service tightvncserver.save.2 at depth 2
insserv:  loop involving service rpc_shellinaboxd at depth 1
insserv: Stopping tightvncserver.save.2 depends on rpc_shellinaboxd and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing x11-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libxtst6:armhf:
 libxtst6:armhf depends on x11-common; however:
  Package x11-common is not configured yet.

dpkg: error processing libxtst6:armhf (--configure):
 dependency problems - leaving unconfigured
Setting up samba (2:3.6.6-6) ...
insserv: script tightvncserver.save.1: service vncserver already provided!
insserv: warning: script 'tightvncserver.save.2' missing LSB tags and overrides
insserv: There is a loop between service rpc_shellinaboxd and tightvncserver.save.2 if stopped
insserv:  loop involving service tightvncserver.save.2 at depth 2
insserv:  loop involving service rpc_shellinaboxd at depth 1
insserv: Stopping tightvncserver.save.2 depends on rpc_shellinaboxd and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing samba (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up nfs-common (1:1.2.6-4) ...
insserv: warning: current start runlevel(s) (empty) of script `nfs-common' overrides LSB defaults (2 3 4 5 S).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6 S) of script `nfs-common' overrides LSB defaults (0 1 6).
insserv: script tightvncserver.save.1: service vncserver already provided!
insserv: warning: script 'tightvncserver.save.2' missing LSB tags and overrides
insserv: There is a loop between service rpc_shellinaboxd and tightvncserver.save.2 if stopped
insserv:  loop involving service tightvncserver.save.2 at depth 2
insserv:  loop involving service rpc_shellinaboxd at depth 1
insserv: Stopping tightvncserver.save.2 depends on rpc_shellinaboxd and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing nfs-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 winbind
 libnss-winbind:armhf
 libpam-winbind:armhf
 dbus
 dbus-x11
 x11-common
 libxtst6:armhf
 samba
 nfs-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Needless to say, I can't "see" the RasPi from my Win7 laptop, although I can ping it by IP address and by name.

I have spent too long googling these errors. Many people are getting very similar errors, but none exactly the same. Answers posted by various people just don't work! I'm afraid that this form of error reporting is completely over my head as I don't understand the "lingo".
Does anyone have any answers?
I have of course tried uninstalling and re-installing but the same problem. I have also "updated" and "upgraded" but that fails with the same errors.
Please note that the first few lines of my error report above are showing "already newest version" because it does appear to think that the install worked.

Thanks for listening.

Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Re: Samba Install Problems

Sun Aug 04, 2013 8:46 pm

I'm guessing no-one has an answer to this? I'm becoming very disillusioned with the Raspberry Pi! It is hugely user-unfriendly and when something goes wrong, it is actually worse than Windows for error handling and reporting.

My next step was to re-format the SD card with clean Raspbian Wheezy install, but I wanted to backup my files first. Simple, yes? NO! Simple with Windows, ridiculously impossible with Linux!!! If I remove the SD card and connect it to my Windows 7 laptop, I can't see the full card. Fair enough, I understand that. So, I reboot Raspbian and think to myself I'll make a copy of the files on my USB hard disc which is connected to my Pi. But no, the hard disc is write-protected. How? Why? After an hour of googling I give up! Advice is to unmount the drive and remount using various parameters.....no good, still says "file system is read only". In fact, everything I do comes back with "file system is read only". How is that useful?

So, in a nutshell, I have an SD card with files I need which I just can't backup. Linux sucks, big time!! And the worst thing is, everyone thinks that's fine! A few people in some of the forums I've accessed come up with a long method consisting of many lines of code, which in any case doesn't work. For god's sake, all i want to do is copy some files from a mounted SD card to a mounted USB hard disc. But Linux renders this impossible and provides no answer to the problem. And the Linux fans are happy with this!! I dislike Windows and all that MS stands for, but for goodness sake I can do CTRL A, CTRL C, CTRL V and all my files are backed up!

Luckily my Raspberry Pi was only £25 but I can't replace the hundreds of frustrated hours I've wasted on this very promising product.

The Raspberry Pi is great, the OS is rubbish and created by geeks for geeks in order to make the average person baffled and confused.

Moan over, Linux days over!!

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Samba Install Problems

Sun Aug 04, 2013 9:01 pm

There should be no real problems copying files to a correctly mounted USB drive - I do it all the time. I can only think you have to mounted the drive correctly.

It is also trivial to mount a share on a Windows system from the Pi without the need to worry with something like Samba as the client software for such a link (cifs) is part of the standard install. I can only think you are doing a bad job of explaining exactly what is happening, or describing the errors you are seeing when it goes wrong.

andrum99
Posts: 1255
Joined: Fri Jul 20, 2012 2:41 pm

Re: Samba Install Problems

Sun Aug 04, 2013 9:21 pm

Aristillus wrote:Hi,
Can anyone help with a problem I have spent many hours trying unsuccessfully to resolve?

I was trying to add Samba to my Raspbian distro (I think in hindsight it was already installed). I was reading an article about accessing a RasbPi external drive from my Win 7 laptop. The article said to do the following:
sudo apt-get install samba samba-common samba-common-bin winbind
You don't need winbind to get samba working. The errors to do with tightvncserver probably don't make any difference to samba.

My procedure for installing samba is as follows:

sudo apt-get update
sudo apt-get install samba samba-common-bin (samba-common-bin is needed for smbpasswd, otherwise just samba on its own pulls in everything you need)

sudo smbpasswd -a pi (then enter password)

Add a share of my own to /etc/samba/smb.conf, for example:

Code: Select all

[pi]
path = /home/pi
read only = no
valid users = pi
nt acl support = no
Then restart samba with sudo service samba restart.

HTH

Andrew.

Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Re: Samba Install Problems

Sun Aug 04, 2013 11:28 pm

Hi Andres,
Thanks for your reply. This is exactly what I have tried but the pi cannot be seen under "network" from a windows 7 PC with the same workgroup.

Dave

Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Re: Samba Install Problems

Sun Aug 04, 2013 11:37 pm

@itimpi

Bad job of describing the errors? Not sure what you mean by that.
Any attempt to write to the drive fails with an error stating that the drive is "read only". The drive hasn't been mounted by me. It mounts automatically when I plug it in. The distro is raspbian wheezy. Any attempt to change the permission of the relevant folder fails, as does unmounting the drive and mounting it from root (which I would expect would make it writable but doesn't, neither doors it allow me to change permissions). Chmod doesn't work either.

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Samba Install Problems

Mon Aug 05, 2013 7:46 am

Aristillus wrote:@itimpi

Bad job of describing the errors? Not sure what you mean by that.
Any attempt to write to the drive fails with an error stating that the drive is "read only". The drive hasn't been mounted by me. It mounts automatically when I plug it in. The distro is raspbian wheezy. Any attempt to change the permission of the relevant folder fails, as does unmounting the drive and mounting it from root (which I would expect would make it writable but doesn't, neither doors it allow me to change permissions). Chmod doesn't work either.
The missing info is the automount I suspect! I cannot remember off-hand where the permissions used by the automount are specified as I have explicit mounts for my devices.

If you do the mount manually from a terminal session and specify it be mounted rw for user pi you should be OK. Another possibility is do the copy itself as root (using sudo) from a terminal session as that bypasses permission issues. One useful thing to know about Linux is that you can mount the same device multiple times at different mount points if that is convenient.

If you are still getting problems then the file system on the USB device could be damaged as in such a situation a read-only mount is forced. You can fix such issues using fsck under Linux or chkdsk under Windows.

Having said all the above, I find it most convenient to mount a share on the Windows box at the Pi. I do this by adding an entry of the form:

Code: Select all

//windows-pc-address/sharename /pi-mount-point cifs defaults,rw 0 0
to /etc/fstab although you can do something similar via the mount command. I think you can probably also mount a network share via the file manager in the GUI but I do not use that methods and am not currently near a Pi to check that out.

Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Re: Samba Install Problems

Mon Aug 05, 2013 9:02 am

Hi,
None of those things work for me. I already tried mounting the drive with rw permissions for user pi, but it doesn't work.
The obvious thing (using the terminal to copy) also doesn't work........

pi@raspberrypi /media/DaveMedia $ sudo mkdir test
mkdir: cannot create directory `test': Read-only file system

The drive I am using (1TB ext USB drive) is fine...no errors and works perfectly with windows.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2415
Joined: Thu Jul 11, 2013 2:37 pm

Re: Samba Install Problems

Mon Aug 05, 2013 1:44 pm

The error message "filesystem is read-only" does exactly what it says on the tin. You are using a filesystem that has no documentation publicly available as to the internal workings and therefore the default Linux driver will have read-only support in case it encounters something it doesn't understand, writes some data and wipes out the filesystem.

NTFS-3g, a usermode driver has write support.

Code: Select all

$ sudo apt-get install ntfs-3g
You may then be able to plug in the device and ntfs-3g should pick it up. If not, do it manually:

Code: Select all

$ sudo mount
* list of mounted devices, usb typically /dev/sda1 *

$ sudo umount /dev/whatever
$ sudo mount -t ntfs-3g /dev/whatever /media/USB
Rockets are loud.
https://astro-pi.org

Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Re: Samba Install Problems

Mon Aug 05, 2013 7:38 pm

Don't really understand this. One of the common things to do with the Pi (apart from create an xbmc media centre) is to use it as a NAS drive. People say they have done this using the Raspbian Wheezy distro which is exactly what I am using.

However, the truth is that Raspbian apparently uses a non-writable file system. What use is that? This explains why when I'm using my Pi as XBMC I can play my music & videos but can't save any onto the drive unless I unplug it, connect it to my Win7 PC and copy them on to it then unplug and reconnect to the Pi. Not very convenient.

I was hoping that I could access my USB disc drive (connected to my Pi) from my Win7 laptop but no chance. Whatever I do, there seems no way to "see" the Pi, although I can "ping" it. Neither can I access my Win7 PC from the Pi. They remain obstinately separate!

So although the Pi may be a cheap way to make a NAS drive, 6 days of solid "googling" has provided no way of getting it to work.

Best use of the Pi is as XMBC with my Android phone as a remote, or to turn LEDs on via the GPIO pins, again using my phone. Fun but not as useful as a NAS drive! ;-)

Thanks for your help anyway

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Samba Install Problems

Mon Aug 05, 2013 8:34 pm

What format is the USB disk? The default drivers for NTFS built into Linux give read-only access so I wonder if that is your issue. If you install the ntfs-3g driver then this gives full read-write access to NTFS disks.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2415
Joined: Thu Jul 11, 2013 2:37 pm

Re: Samba Install Problems

Mon Aug 05, 2013 8:46 pm

Aristillus wrote:Don't really understand this. One of the common things to do with the Pi (apart from create an xbmc media centre) is to use it as a NAS drive. People say they have done this using the Raspbian Wheezy distro which is exactly what I am using.

However, the truth is that Raspbian apparently uses a non-writable file system. What use is that? This explains why when I'm using my Pi as XBMC I can play my music & videos but can't save any onto the drive unless I unplug it, connect it to my Win7 PC and copy them on to it then unplug and reconnect to the Pi. Not very convenient.

I was hoping that I could access my USB disc drive (connected to my Pi) from my Win7 laptop but no chance. Whatever I do, there seems no way to "see" the Pi, although I can "ping" it. Neither can I access my Win7 PC from the Pi. They remain obstinately separate!

So although the Pi may be a cheap way to make a NAS drive, 6 days of solid "googling" has provided no way of getting it to work.

Best use of the Pi is as XMBC with my Android phone as a remote, or to turn LEDs on via the GPIO pins, again using my phone. Fun but not as useful as a NAS drive! ;-)

Thanks for your help anyway
As itmpi said, your drive is using the NTFS file system.

Did you attempt to follow the instructions I posted?
Rockets are loud.
https://astro-pi.org

Aristillus
Posts: 10
Joined: Fri Aug 02, 2013 9:45 pm

Re: Samba Install Problems

Tue Aug 06, 2013 8:46 am

@jdb, yes I followed your instructions and the drive was then readable from a terminal but not from GUI. The idea of using the Pi as a NAS drive was to write to it by transferring files from both the Pi to the USB drive but also from my Win7 PC to the USB drive (connected to the Pi). As I can't even "see" the Pi from Win7 let alone access it's files, it is proving to be too time consuming. It was only an experiment; buying a stand-alone NAS drive is the obvious way to do it, but I thought it would be fairly straightforward to use the Pi - I hadn't realised just how user-unfriendly Linux is. The main reason for the Raspberry Pi charity was to encourage young people to get back into proper programming. Installing and using Python 3 to control GPIO pins is fairly straightforward and explained in many places on t'internet. However, the relatively simple issues I'm talking about in my post are ridiculously difficult to fathom and far from intuitive. Try googling for solutions to my problems here....there are several solutions, most of which haven't worked for the people who asked the question, and hundreds of people are stuck without a solution.

Iliya
Posts: 1
Joined: Wed May 25, 2016 11:31 pm

Re: Samba Install Problems

Wed May 25, 2016 11:34 pm

Yo, after battling with the pi3 for a week, I just discovered the problem - winbnd was not installed. Is it included in the distro? I upgrade every day, or thereabouts.

Return to “Troubleshooting”