Samba not installing
Tofloor
poster avatar
faisal6309
deepin
2016-10-31 03:12
Author
Edited by faisal6309 at 2016-10-30 16:14

I want to access Windows share folder in my Deepin Linux. I made folder named media in mnt folder and I tried to mount windows share with following command:
  1. sudo mount -t cifs -o username=media,password= smb//192.168.11.3/media /mnt/media
Copy the Code
But I got this instead.
  1. mount: wrong fs type, bad option, bad superblock on smb//192.168.11.3/media,
  2.        missing codepage or helper program, or other error
  3.        (for several filesystems (e.g. nfs, cifs) you might
  4.        need a /sbin/mount. helper program)

  5.        In some cases useful info is found in syslog - try
  6.        dmesg | tail or so.
Copy the Code


I thought Samba wasn't installed in my computer. So I tried installing Samba in my computer. with the following command:
  1. sudo apt-get install samba
Copy the Code
But I got this instead.
  1. Reading package lists... Done
  2. Building dependency tree      
  3. Reading state information... Done
  4. The following additional packages will be installed:
  5.   attr libaio1 libfile-copy-recursive-perl python-crypto python-dnspython python-ldb python-samba python-tdb
  6.   samba-common-bin samba-dsdb-modules samba-vfs-modules tdb-tools update-inetd
  7. Suggested packages:
  8.   python-crypto-dbg python-crypto-doc bind9 bind9utils ctdb ldb-tools ntp smbldap-tools winbind ufw
  9.   heimdal-clients
  10. The following NEW packages will be installed:
  11.   attr libaio1 libfile-copy-recursive-perl python-crypto python-dnspython python-ldb python-samba python-tdb
  12.   samba samba-common-bin samba-dsdb-modules samba-vfs-modules tdb-tools update-inetd
  13. 0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
  14. Need to get 3,958 kB of archives.
  15. After this operation, 26.1 MB of additional disk space will be used.
  16. Do you want to continue? [Y/n] y
  17. Get:1 http://packages.deepin.com/deepin unstable/main amd64 python-dnspython all 1.14.0-3 [98.8 kB]
  18. Get:2 http://packages.deepin.com/deepin unstable/main amd64 python-crypto amd64 2.6.1-6+b1 [260 kB]            
  19. Get:3 http://packages.deepin.com/deepin unstable/main amd64 python-ldb amd64 2:1.1.26-1 [34.5 kB]               
  20. Get:4 http://packages.deepin.com/deepin unstable/main amd64 python-tdb amd64 1.3.9-1 [16.2 kB]                  
  21. Get:5 http://packages.deepin.com/deepin unstable/main amd64 python-samba amd64 2:4.4.5+dfsg-2 [1,241 kB]        
  22. Get:6 http://packages.deepin.com/deepin unstable/main amd64 samba-common-bin amd64 2:4.4.5+dfsg-2 [599 kB]      
  23. Get:7 http://packages.deepin.com/deepin unstable/main amd64 tdb-tools amd64 1.3.9-1 [26.3 kB]                  
  24. Get:8 http://packages.deepin.com/deepin unstable/main amd64 libfile-copy-recursive-perl all 0.38-1 [20.6 kB]   
  25. Get:9 http://packages.deepin.com/deepin unstable/main amd64 update-inetd all 4.43 [21.8 kB]                     
  26. Get:10 http://packages.deepin.com/deepin unstable/main amd64 samba amd64 2:4.4.5+dfsg-2 [935 kB]               
  27. Get:11 http://packages.deepin.com/deepin unstable/main amd64 attr amd64 1:2.4.47-2 [42.8 kB]                    
  28. Get:12 http://packages.deepin.com/deepin unstable/main amd64 libaio1 amd64 0.3.110-3 [9,412 B]                  
  29. Get:13 http://packages.deepin.com/deepin unstable/main amd64 samba-dsdb-modules amd64 2:4.4.5+dfsg-2 [312 kB]   
  30. Get:14 http://packages.deepin.com/deepin unstable/main amd64 samba-vfs-modules amd64 2:4.4.5+dfsg-2 [341 kB]   
  31. Fetched 3,958 kB in 6min 20s (10.4 kB/s)                                                                        
  32. Preconfiguring packages ...
  33. Selecting previously unselected package python-dnspython.
  34. (Reading database ... 169571 files and directories currently installed.)
  35. Preparing to unpack .../python-dnspython_1.14.0-3_all.deb ...
  36. Unpacking python-dnspython (1.14.0-3) ...
  37. Selecting previously unselected package python-crypto.
  38. Preparing to unpack .../python-crypto_2.6.1-6+b1_amd64.deb ...
  39. Unpacking python-crypto (2.6.1-6+b1) ...
  40. Selecting previously unselected package python-ldb.
  41. Preparing to unpack .../python-ldb_2%3a1.1.26-1_amd64.deb ...
  42. Unpacking python-ldb (2:1.1.26-1) ...
  43. Selecting previously unselected package python-tdb.
  44. Preparing to unpack .../python-tdb_1.3.9-1_amd64.deb ...
  45. Unpacking python-tdb (1.3.9-1) ...
  46. Selecting previously unselected package python-samba.
  47. Preparing to unpack .../python-samba_2%3a4.4.5+dfsg-2_amd64.deb ...
  48. Unpacking python-samba (2:4.4.5+dfsg-2) ...
  49. Selecting previously unselected package samba-common-bin.
  50. Preparing to unpack .../samba-common-bin_2%3a4.4.5+dfsg-2_amd64.deb ...
  51. Unpacking samba-common-bin (2:4.4.5+dfsg-2) ...
  52. Selecting previously unselected package tdb-tools.
  53. Preparing to unpack .../tdb-tools_1.3.9-1_amd64.deb ...
  54. Unpacking tdb-tools (1.3.9-1) ...
  55. Selecting previously unselected package libfile-copy-recursive-perl.
  56. Preparing to unpack .../libfile-copy-recursive-perl_0.38-1_all.deb ...
  57. Unpacking libfile-copy-recursive-perl (0.38-1) ...
  58. Selecting previously unselected package update-inetd.
  59. Preparing to unpack .../update-inetd_4.43_all.deb ...
  60. Unpacking update-inetd (4.43) ...
  61. Selecting previously unselected package samba.
  62. Preparing to unpack .../samba_2%3a4.4.5+dfsg-2_amd64.deb ...
  63. Unpacking samba (2:4.4.5+dfsg-2) ...
  64. Selecting previously unselected package attr.
  65. Preparing to unpack .../attr_1%3a2.4.47-2_amd64.deb ...
  66. Unpacking attr (1:2.4.47-2) ...
  67. Selecting previously unselected package libaio1:amd64.
  68. Preparing to unpack .../libaio1_0.3.110-3_amd64.deb ...
  69. Unpacking libaio1:amd64 (0.3.110-3) ...
  70. Selecting previously unselected package samba-dsdb-modules.
  71. Preparing to unpack .../samba-dsdb-modules_2%3a4.4.5+dfsg-2_amd64.deb ...
  72. Unpacking samba-dsdb-modules (2:4.4.5+dfsg-2) ...
  73. Selecting previously unselected package samba-vfs-modules.
  74. Preparing to unpack .../samba-vfs-modules_2%3a4.4.5+dfsg-2_amd64.deb ...
  75. Unpacking samba-vfs-modules (2:4.4.5+dfsg-2) ...
  76. Processing triggers for libc-bin (2.23-4) ...
  77. Processing triggers for man-db (2.7.5-1) ...
  78. Processing triggers for systemd (231-1) ...
  79. Setting up python-dnspython (1.14.0-3) ...
  80. Setting up python-crypto (2.6.1-6+b1) ...
  81. Setting up python-ldb (2:1.1.26-1) ...
  82. Setting up python-tdb (1.3.9-1) ...
  83. Setting up python-samba (2:4.4.5+dfsg-2) ...
  84. Setting up samba-common-bin (2:4.4.5+dfsg-2) ...
  85. Setting up tdb-tools (1.3.9-1) ...
  86. update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
  87. Setting up libfile-copy-recursive-perl (0.38-1) ...
  88. Setting up update-inetd (4.43) ...
  89. Setting up samba (2:4.4.5+dfsg-2) ...
  90. Adding group `sambashare' (GID 122) ...
  91. Done.
  92. Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service.
  93. Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
  94. /usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
  95. Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
  96. Job for nmbd.service failed because a timeout was exceeded.
  97. See "systemctl status nmbd.service" and "journalctl -xe" for details.
  98. invoke-rc.d: initscript nmbd, action "start" failed.
  99. ● nmbd.service - Samba NMB Daemon
  100.    Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
  101.    Active: failed (Result: timeout) since Sun 2016-10-30 15:58:27 PKT; 9ms ago
  102.      Docs: man:nmbd(8)
  103.            man:samba(7)
  104.            man:smb.conf(5)
  105. Main PID: 14732
  106.    Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."
  107.     Tasks: 1 (limit: 4915)
  108.    CGroup: /system.slice/nmbd.service

  109. Oct 30 15:58:17 faisal6309-pc systemd[1]: Starting Samba NMB Daemon...
  110. Oct 30 15:58:17 faisal6309-pc systemd[1]: nmbd.service: Supervising process 14732 which is not our child....xits.
  111. Oct 30 15:58:27 faisal6309-pc systemd[1]: nmbd.service: Start operation timed out. Terminating.
  112. Oct 30 15:58:27 faisal6309-pc systemd[1]: nmbd.service: Killing process 14732 (nmbd) with signal SIGKILL.
  113. Oct 30 15:58:27 faisal6309-pc systemd[1]: Failed to start Samba NMB Daemon.
  114. Oct 30 15:58:27 faisal6309-pc systemd[1]: nmbd.service: Unit entered failed state.
  115. Oct 30 15:58:27 faisal6309-pc systemd[1]: nmbd.service: Failed with result 'timeout'.
  116. Hint: Some lines were ellipsized, use -l to show in full.
  117. dpkg: error processing package samba (--configure):
  118. subprocess installed post-installation script returned error exit status 1
  119. Setting up attr (1:2.4.47-2) ...
  120. Setting up libaio1:amd64 (0.3.110-3) ...
  121. Setting up samba-dsdb-modules (2:4.4.5+dfsg-2) ...
  122. Setting up samba-vfs-modules (2:4.4.5+dfsg-2) ...
  123. Processing triggers for libc-bin (2.23-4) ...
  124. Processing triggers for systemd (231-1) ...
  125. Errors were encountered while processing:
  126. samba
  127. E: Sub-process /usr/bin/dpkg returned an error code (1)
Copy the Code

I searched a little and on one website, they said run the following command:
  1. sudo service nmbd start
Copy the Code
But I got this instead.
  1. Job for nmbd.service failed because a timeout was exceeded.
  2. See "systemctl status nmbd.service" and "journalctl -xe" for details.
Copy the Code


I need to connect to that windows share because it has more than 4TB of data that can be used for entertainment purposes. How do I solve this problem? Is there any other way to install Samba in my computer? Or do I have to mount windows share folder with some other command?
Reply Favorite View the author
All Replies
faisal6309
deepin
2016-11-03 03:30
#1
Hello, anybody home?
Reply View the author
kayoo
deepin
2016-11-03 04:47
#2
have you cifs support installed ?

  1. sudo apt-get install cifs-utils
Copy the Code


And you juste have to follow by :

  1. mkdir /local/path
  2. mount –t cifs –o username=,password= \\\remote\path /local/path
Copy the Code



Reply View the author
kayoo
deepin
2016-11-03 04:49
#3
If there is any space in the server path, you need to replace it by \040, for example //servername/My\040Documents
Reply View the author
faisal6309
deepin
2016-11-03 07:40
#4
https://bbs.deepin.org/post/31687
If there is any space in the server path, you need to replace it by \040, for example //servername/M ...

It worked like that before on other Linux distributions. It just doesn't work on Deepin Linux. Here is the code that worked on all other Linux distributions.

sudo mount -t cifs -o username=media,password= smb//192.168.11.3/media /mnt/media
Reply View the author
kayoo
deepin
2016-11-04 05:14
#5
I think you mixed some CLI....
If you want to point ont smb://... why not use smbmount

  1. #smbmount //192.168.0.1/share1 /mnt –o username=user,workgroup=test
  2. or
  3. #mount –t smbfs 192.168.0.1:/share1 /mnt –o username=user,workgroup=test
Copy the Code


If you want to use CIFS (advanced SMB file system implementation which support RAP (Remote Access Protocol))

  1. #mount –t cifs 192.168.0.1:/share1 /test –o username=user,workgroup=test
Copy the Code


What do you see in your log ?
Reply View the author
New Thread

Popular Ranking

Change

Popular Events

More
国际排名
WHLUG