- Печать
Страницы: [1] 2 Все Вниз
Тема: Ошибка 255 при запуске ‘net usershare’ (Прочитано 35890 раз)
0 Пользователей и 1 Гость просматривают эту тему.
lcnet
Добрый день!
После обновления с Ubunta 9.04 до 9.10 при попытке расшарить папку периодически вылетает эта ошибка:
«Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Memory allocation error»
Пробовал рестатить самбу «sudo /etc/init.d/samba restart»
Пробовал расшаривать через консоль с помощью «net usershare»
Самое интересное что ошибка не постоянная, появляется после перезагрузки системы и исчезает после первой же перезагрузки ситемы, а бывает что раз по 10 рестартить приходится.
Как это лечить?
З.Ы. Сильно не ругаться я новичок в Линуксоводстве)
kosh59
лечится оно добавлением в файл /etc/samba/smb.conf
строчки
usershare owner only = false
ну и конечно перезапуском самбы
sudo /etc/init.d/samba restart
nocturna
Та-же проблема.
Ошибка 255 при запуске 'net usershare': net usershare add: cannot convert name "Everyone" to a SID. Memory allocation error.
Добавление usershare owner only = false не помогло…
S.Dedal
У меня похожая проблема. Поставил Ubuntu 9.10 второй системой после Windows 7, при попытке расшарить папку, находящуюся на винте с файловой системой ntfs получаю пресловутую ошибку 255. Прописал строчку usershare owner only = false в /etc/samba/smb.conf следующим образом:
Но эта ошибка все равно появляется, перезапуск самбы и перезагрузка не помогли.
Возможно что-то сделал не так или прописал не туда, т.к. Ubuntu поставил недавно и в ней я нубас полнейший.
lcnet
kosh59, Неее тут другое… такое ощущение что все ошибки с ‘net usershare’ именуются Ошибка 255…
Вот пример:
«Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot share path /media/disk as we are restricted to only sharing directories we own. Ask the administrator to add the line «usershare owner only = False» to the [global] section of the smb.conf to allow this«
— Эта ошибка значит вы пытаетесь сделать общедоступным диск или папку, владельцем которой ваша учётная запись не является.
Как ты и горишь надо в etc/samba/smb.conf и в секцию [global] в подраздел Misc дописать строчку:
usershare owner only = False.
Это разрешит нам как пользователю открывать общий доступ к чужим объектам. Так, диски находятся в ведении суперпользователя.
Опять таки ошибка с номером 255
«Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Memory allocation error«
— Чем она лечится я так и не понял, или мои махинации помогли то-ли этот глюк прошел сам через пару обновлений…
Я делал так.
1) Примонтировал диски таким нехитрым способом
sudo gedit /etc/mtab
скопировал нужное и в вставил в
sudo gedit /etc/fstab
заменив fuseblk на ntfs-3g
1.2) строка «usershare owner only = False«. у меня уже была прописана… если у Вас нет, вставьте на всяк пожарный
2) Поставил самбу «Sudo apt-get install samba«,
3) Расшарил папки через ГУИ Samb’ы «Система/Администрирование/Samba» назначив там нужные права доступа.
« Последнее редактирование: 27 Января 2010, 20:44:22 от lcnet »
netsloff
попробуйте так sudo /etc/init.d/samba restart Если будет так (ок) (fail) то сделайте так sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart мне помогло…
stepnoy
мне это не помогло
попробуйте так sudo /etc/init.d/samba restart Если будет так (ок) (fail) то сделайте так sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart мне помогло…
вот такая постоянно ошибка
кто может подсказать в чем тут проблема?
GrafTrahula
можно попробовать запустить sudo nautilus и через него повторить расшаривание.мне помогло
simulyant
У меня при расшаривании папки через nautilus возникает эта ошибка «Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter»
— добавление usershare owner only = false в /etc/samba/smb.conf — не помогло
— Переустановка samba-common-bin — sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart — не помогло
— Запуск sudo nautilus не помог
Что делать?
Ubuntu 10.04 Netbook Edition
Kiberman
У меня при расшаривании папки через nautilus возникает эта ошибка «Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter»
— добавление usershare owner only = false в /etc/samba/smb.conf — не помогло
— Переустановка samba-common-bin — sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart — не помогло
— Запуск sudo nautilus не помог
Что делать?
тоже такая же ошибка,решения пока не нашёл может кто из постояльцев ответит
« Последнее редактирование: 09 Марта 2011, 15:49:08 от Kiberman »
gregory5
Расшаривай через конфиг, а не наутилус, и да судо наутилус запуститься без поддержки сети из за кривизны в шине, запускать нужно sudo dbus-launch nautilus, но не расшаривай наутилусом, криво оно работает
0konstantin0
как я понял такое бывает если дополнительно установить сервер самба из репозитория помимо стандартного….
IAmABanana
Была такая же проблема с расшариванием собственых папок через роутер. Решилось всё очень просто: идём Система>Администрирование>опубликованные папки и добавляем всё что нужно.
KXStudio 14.04 дуалбут с Win7
Lenovo Thinkpad X230
ps1x0
Здравствуйте, уважаемые. Была похожая проблема: не мог расшарить папку с полным доступом на ntfs разделе.
Победил с помощью добавления строчки usershare owner only = false в секцию [global] /etc/samba/smb.conf
Потом возникла проблема с предоставлением гостевого доступа к расшаренной папке. Не знаю что тут сыграло определяющую роль, но во-первых убрал sticky-бит c usershares
sudo chmod -t /var/lib/samba/usershares
во-вторых примонтировал раздел с ntfs c правами drwxrwxrwx, путем изменения umask=007 на umask=000. В итоге строчка в fstab с ntfs разделом выглядела следующим образом:
UUID=C53D4B0FAEB1E5A1 /media/data ntfs defaults,umask=000,gid=46 0 0
Решил на всякий случай написать, может кому-нибудь пригодится. Ubuntu 10.04 LTS
« Последнее редактирование: 18 Ноября 2011, 10:56:02 от ps1x0 »
Если отдавать ужин врагу, можно приобрести друга (с)
denisyan
проблема решилась так. Началось это после установки сервера и изменении прав вна каталог VAR. Я вернул права на место и через рута (sudo nautilus) назначил общий доступ. Папка появилась в сети после перезагрузки
- Печать
Страницы: [1] 2 Все Вверх
This document (7018701) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11 Service Pack 4 (SLES 11 SP4)
Situation
Upon right-clicking a folder in Gnome’s Nautilus file manager, choosing «Sharing Options,» selecting the «Share this folder» box and clicking the «Create Share» button in the open dialog, the following error is returned:
‘net usershare’ returned error 255: net usershare add: cannot convert name «Everyone» to a SID. Access denied.
Resolution
Since samba-client version 3.6.3-76.1, a new global option is required in smb.conf.
hostname:~ # vi /etc/samba/smb.conf
Add this option under the [global] section:
client ipc signing = auto
After the change is written, restart the samba service:
hostname:~ # rcsmb restart
Cause
Several CVEs were addressed for this samba-client package with the update to version 3.6.3-76.1. As a result of these changes, this new client ipc signing configuration option is required when creating usershares through Nautilus.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.
- Document ID:7018701
- Creation Date:
09-Mar-2017 - Modified Date:28-Sep-2022
-
- SUSE Linux Enterprise Server
< Back to Support Search
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com
Hey folks, I’ve been struggling with Samba and folder sharing for the last 2 days and I’m at a loss and hoping that somebody more knowledgeable can help.
I’ve had Samba running well on a Linux Mint 20 Cinnamon edition machine for many months without issue. I recently installed Linux Mint Cinnamon on 2 other machines and having been trying to get Samba working on them but keep getting this error when trying to share any folder:
net usershare returned error 255: net usershare add:
cannot convert name «mark» to a SID. None of the
information to be translated has been translated..
I have uninstalled and reinstalled Samba and the Samba Client several times, and tried various options in the smb.conf file but nothing seems to work. I then checked the machine that Samaba has been running on and while previous shared folders are still shared, I get the same error if I try to share any new folders.
If anybody can help me solve the issue before I end up pulling my hair out I would greatly appreciate it.
Here are the results for testparm -s
mark@Home-Linux:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE
# Global parameters
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
passwd program = /usr/bin/passwd %u
server role = standalone server
server string = %h server (Samba, Ubuntu)
unix password sync = Yes
usershare allow guests = Yes
usershare owner only = No
workgroup = MARK
idmap config * : backend = tdb
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
Another «‘net usershare’ returned error 255:»
Esteemed Ubuntu Users & Devs,
Some how i’ve buggered my ability to share anything from my Ubuntu install.
This message:
‘net usershare’ returned error 255: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter.
keeps appearing when ever i try to share my own «Public» folder including ticking «Allow others to create and delet files in this folder»
I’ve tried purging and reinstalling samba and related packges per tips from similar threads. All to no avail. Its rather killing me and i’d be ever so gratful if some one could help me trouble shoot this *&$# which is preventing me from migrating my data from the old ******* pc onto the shiny new 11.10 machine. With the goal to getting this machine accessible from windows.
FWIW, my entire smb.conf file (sans comment preface) and also the permissions on the public folder below.
thanks in advance, KB
Code:
$ ls -l ~/Public total 4 drwxrwxr-x 2 karl karl 4096 2012-02-17 21:39 <snip> #======================= Global Settings ======================= [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP # server string is the equivalent of the NT Description field server string = %h server (Samba, Ubuntu) # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server # wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no # What naming service and in what order should we use to resolve host names # to IP addresses ; name resolve order = lmhosts host wins bcast #### Networking #### # The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0 # Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes #### Debugging/Accounting #### # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Cap the size of the individual log files (in KiB). max log size = 1000 # If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no # We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0 # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. # security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. encrypt passwords = false # If you are using encrypted passwords, Samba will need to know what # password database type you are using. passdb backend = tdbsam obey pam restrictions = yes # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for # sending the correct chat script for the passwd program in Debian Sarge). passwd program = /usr/bin/passwd %u passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* . # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. pam password change = yes # This option controls how unsuccessful authentication attempts are mapped # to anonymous connections map to guest = bad user ########## Domains ########### # Is this machine able to authenticate users. Both PDC and BDC # must have this setting enabled. If you are the BDC you must # change the 'domain master' setting to no # ; domain logons = yes # # The following setting only takes effect if 'domain logons' is set # It specifies the location of the user's profile directory # from the client point of view) # The following required a [profiles] share to be setup on the # samba server (see below) ; logon path = \%Nprofiles%U # Another common choice is storing the profile in the user's home directory # (this is Samba's default) # logon path = \%N%Uprofile # The following setting only takes effect if 'domain logons' is set # It specifies the location of a user's home directory (from the client # point of view) ; logon drive = H: # logon home = \%N%U # The following setting only takes effect if 'domain logons' is set # It specifies the script to run during logon. The script must be stored # in the [netlogon] share # NOTE: Must be store in 'DOS' file format convention ; logon script = logon.cmd # This allows Unix users to be created on the domain controller via the SAMR # RPC pipe. The example command creates a user account with a disabled Unix # password; please adapt to your needs ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u # This allows machine accounts to be created on the domain controller via the # SAMR RPC pipe. # The following assumes a "machines" group exists on the system ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u # This allows Unix groups to be created on the domain controller via the SAMR # RPC pipe. ; add group script = /usr/sbin/addgroup --force-badname %g ########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this # load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. ; printing = cups ; printcap name = cups ############ Misc ############ # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting ; include = /home/samba/etc/smb.conf.%m # Most people will find that this option gives better performance. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html # for details # You may want to add the following on a Linux system: # SO_RCVBUF=8192 SO_SNDBUF=8192 # socket options = TCP_NODELAY # The following parameter is useful only if you have the linpopup package # installed. The samba maintainer and the linpopup maintainer are # working to ease installation and configuration of linpopup and samba. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & # Domain Master specifies Samba to be the Domain Master Browser. If this # machine will be configured as a BDC (a secondary logon server), you # must set this to 'no'; otherwise, the default behavior is recommended. # domain master = auto # Some defaults for winbind (make sure you're not using the ranges # for something else.) ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash # The following was the default behaviour in sarge, # but samba upstream reverted the default because it might induce # performance issues in large organizations. # See Debian bug #368251 for some of the consequences of *not* # having this setting and smb.conf(5) for details. ; winbind enum groups = yes ; winbind enum users = yes # Setup usershare options to enable non-root users to share folders # with the net usershare command. # Maximum number of usershare. 0 (default) means that usershare is disabled. ; usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones usershare allow guests = yes #======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home director as \serverusername ;[homes] ; comment = Home Directories ; browseable = no # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. ; read only = yes # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. ; create mask = 0700 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. ; directory mask = 0700 # By default, \serverusername shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only "username" can connect to \serverusername # The following parameter makes sure that only "username" can connect # # This might need tweaking when using external authentication schemes ; valid users = %S # Un-comment the following and create the netlogon directory for Domain Logons # (you need to configure Samba to act as a domain controller too.) ;[netlogon] ; comment = Network Logon Service ; path = /home/samba/netlogon ; guest ok = yes ; read only = yes # Un-comment the following and create the profiles directory to store # users profiles (see the "logon path" option above) # (you need to configure Samba to act as a domain controller too.) # The path below should be writable by all users so that their # profile directory may be created the first time they log on ;[profiles] ; comment = Users profiles ; path = /home/samba/profiles ; guest ok = no ; browseable = no ; create mask = 0600 ; directory mask = 0700 [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no # Uncomment to allow remote administration of Windows print drivers. # You may need to replace 'lpadmin' with the name of the group your # admin users are members of. # Please note that you also need to set appropriate Unix permissions # to the drivers directory for these users to have write rights in it ; write list = root, @lpadmin # A sample share for sharing your CD-ROM with others. ;[cdrom] ; comment = Samba server's CD-ROM ; read only = yes ; locking = no ; path = /cdrom ; guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain # an entry like this: # # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom
Last edited by coffeecat; February 17th, 2012 at 11:12 PM.
Reason: Added code tags — please use code tags where appropriate
-
Re: Another «‘net usershare’ returned error 255:»
Still hoping for some pointers on straitening out my Samba and getting this Ubuntu machine visible on the windows network..anyone?
-
Re: Another «‘net usershare’ returned error 255:»
Dutch too huh?
I’ll start in english.
Execute the following in a terminal:
And get the ip-addr out of it.
I’ll give you my output to show how:Code:
eth0 Link encap:Ethernet HWaddr 00:50:8b:6c:be:f7 inet addr:192.168.0.115 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::250:8bff:fe6c:bef7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:82518 errors:0 dropped:0 overruns:0 frame:0 TX packets:77726 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:86613827 (86.6 MB) TX bytes:65692349 (65.6 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:64 errors:0 dropped:0 overruns:0 frame:0 TX packets:64 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4176 (4.1 KB) TX bytes:4176 (4.1 KB)
I need the IP of eth0, it’s the inet addr field (192.168.0.115).
Open your windows machine, click on «Deze Computer» (my computer) and type this in the url-bar:
\<ip>
In my case:
\192.168.0.115And see if it works.
In dutch:
Als je nog andere vragen hebt of als het niet lukt, moet je me PM’en, ik ben slecht in het bijhouden van threads.Last edited by roelforg; February 21st, 2012 at 04:50 PM.
-
Re: Another «‘net usershare’ returned error 255:»
Right,
I’ll include my smb.conf, it works on my pc.You copy/paste it to a new file named smb.conf in your home dir.
Then run this in a terminal (substitute <username> with your username):Code:
sudo bash mkdir /myshare chown -R <username> /myshare/ cd /etc/samba mv smb.conf smb.conf.old cp /home/<username>/smb.conf . chmod 644 smb.conf
reboot
now copy some files to /myshare
and see if your win pc can see it
if it doesn’t work, let me know (pm me again) and i’ll give you the instructions for restoring your smb.conf to before and i’ll try to help you.smb.conf:
Code:
# # Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as # commented-out examples in this file. # - When such options are commented with ";", the proposed setting # differs from the default Samba behaviour # - When commented with "#", the proposed setting is the default # behaviour of Samba but the option is considered important # enough to be mentioned here # # NOTE: Whenever you modify this file you should run the command # "testparm" to check that you have not made any basic syntactic # errors. # A well-established practice is to name the original file # "smb.conf.master" and create the "real" config file with # testparm -s smb.conf.master >smb.conf # This minimizes the size of the really used smb.conf file # which, according to the Samba Team, impacts performance # However, use this with caution if your smb.conf file contains nested # "include" statements. See Debian bug #483187 for a case # where using a master file is not a good idea. # #======================= Global Settings ======================= [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP # server string is the equivalent of the NT Description field server string = %h server (Samba, Ubuntu) # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server # wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no # What naming service and in what order should we use to resolve host names # to IP addresses ; name resolve order = lmhosts host wins bcast #### Networking #### # The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0 # Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes #### Debugging/Accounting #### # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Cap the size of the individual log files (in KiB). max log size = 1000 # If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no # We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0 # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. # security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. encrypt passwords = true # If you are using encrypted passwords, Samba will need to know what # password database type you are using. passdb backend = tdbsam obey pam restrictions = yes # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for # sending the correct chat script for the passwd program in Debian Sarge). passwd program = /usr/bin/passwd %u passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* . # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. pam password change = yes # This option controls how unsuccessful authentication attempts are mapped # to anonymous connections map to guest = bad user ########## Domains ########### # Is this machine able to authenticate users. Both PDC and BDC # must have this setting enabled. If you are the BDC you must # change the 'domain master' setting to no # ; domain logons = yes # # The following setting only takes effect if 'domain logons' is set # It specifies the location of the user's profile directory # from the client point of view) # The following required a [profiles] share to be setup on the # samba server (see below) ; logon path = \%Nprofiles%U # Another common choice is storing the profile in the user's home directory # (this is Samba's default) # logon path = \%N%Uprofile # The following setting only takes effect if 'domain logons' is set # It specifies the location of a user's home directory (from the client # point of view) ; logon drive = H: # logon home = \%N%U # The following setting only takes effect if 'domain logons' is set # It specifies the script to run during logon. The script must be stored # in the [netlogon] share # NOTE: Must be store in 'DOS' file format convention ; logon script = logon.cmd # This allows Unix users to be created on the domain controller via the SAMR # RPC pipe. The example command creates a user account with a disabled Unix # password; please adapt to your needs ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u # This allows machine accounts to be created on the domain controller via the # SAMR RPC pipe. # The following assumes a "machines" group exists on the system ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u # This allows Unix groups to be created on the domain controller via the SAMR # RPC pipe. ; add group script = /usr/sbin/addgroup --force-badname %g ########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this # load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. ; printing = cups ; printcap name = cups ############ Misc ############ # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting ; include = /home/samba/etc/smb.conf.%m # Most people will find that this option gives better performance. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html # for details # You may want to add the following on a Linux system: # SO_RCVBUF=8192 SO_SNDBUF=8192 # socket options = TCP_NODELAY # The following parameter is useful only if you have the linpopup package # installed. The samba maintainer and the linpopup maintainer are # working to ease installation and configuration of linpopup and samba. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & # Domain Master specifies Samba to be the Domain Master Browser. If this # machine will be configured as a BDC (a secondary logon server), you # must set this to 'no'; otherwise, the default behavior is recommended. # domain master = auto # Some defaults for winbind (make sure you're not using the ranges # for something else.) ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash # The following was the default behaviour in sarge, # but samba upstream reverted the default because it might induce # performance issues in large organizations. # See Debian bug #368251 for some of the consequences of *not* # having this setting and smb.conf(5) for details. ; winbind enum groups = yes ; winbind enum users = yes # Setup usershare options to enable non-root users to share folders # with the net usershare command. # Maximum number of usershare. 0 (default) means that usershare is disabled. ; usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones usershare allow guests = yes #======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home director as \serverusername ;[homes] ; comment = Home Directories ; browseable = no # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. ; read only = yes # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. ; create mask = 0700 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. ; directory mask = 0700 # By default, \serverusername shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only "username" can connect to \serverusername # The following parameter makes sure that only "username" can connect # # This might need tweaking when using external authentication schemes ; valid users = %S # Un-comment the following and create the netlogon directory for Domain Logons # (you need to configure Samba to act as a domain controller too.) ;[netlogon] ; comment = Network Logon Service ; path = /home/samba/netlogon ; guest ok = yes ; read only = yes # Un-comment the following and create the profiles directory to store # users profiles (see the "logon path" option above) # (you need to configure Samba to act as a domain controller too.) # The path below should be writable by all users so that their # profile directory may be created the first time they log on ;[profiles] ; comment = Users profiles ; path = /home/samba/profiles ; guest ok = no ; browseable = no ; create mask = 0600 ; directory mask = 0700 [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no # Uncomment to allow remote administration of Windows print drivers. # You may need to replace 'lpadmin' with the name of the group your # admin users are members of. # Please note that you also need to set appropriate Unix permissions # to the drivers directory for these users to have write rights in it ; write list = root, @lpadmin # A sample share for sharing your CD-ROM with others. ;[cdrom] ; comment = Samba server's CD-ROM ; read only = yes ; locking = no ; path = /cdrom ; guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain # an entry like this: # # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom [share] comment = Ubuntu File Server Share path = /myshare browsable = yes guest ok = yes read only = no create mask = 0755
-
Re: Another «‘net usershare’ returned error 255:»
Success!
Not only can i see /myshare (and put a file from my windows into it — hooray), i can now also see one of the shares i tried to make earlier, which is /home/karl i.e. my own home folder.
Which makes me wonder if this is why i was getting the error — trying to share a folder *within* a folder that’s already shared!? Easy to test.
Now i just need to understand what you did to solve my issue. And also how to control access to the shared folder, i.e., require a password from the win machine to access, or not.
Hardstikke bedankt voor uw geduld, tijd & moeite doden dit probleem voor mij!
-
Re: Another «‘net usershare’ returned error 255:»
Sure!
I think it should show a share named «share» right?
Post your entire /etc/samba/smb.conf.old (i created a backup as part of the process i gave you).
I’ll mod it so it’ll have all your old shares with the new (working) config.Pm me when posted!
-
Re: Another «‘net usershare’ returned error 255:»
Originally Posted by kbrand
Success!
Not only can i see /myshare (and put a file from my windows into it — hooray), i can now also see one of the shares i tried to make earlier, which is /home/karl i.e. my own home folder.
Which makes me wonder if this is why i was getting the error — trying to share a folder *within* a folder that’s already shared!? Easy to test.
Now i just need to understand what you did to solve my issue. And also how to control access to the shared folder, i.e., require a password from the win machine to access, or not.
Hardstikke bedankt voor uw geduld, tijd & moeite doden dit probleem voor mij!
FYI: The sharing of the folder within the folder shouldn’t matter.
Also, each share has to be named different.The stuff on http://www.samba.org/samba/docs/man/…TO-Collection/ is maybe a little complex, but if you give it a good thorough read, it should help ya.
-
Re: Another «‘net usershare’ returned error 255:»
Yes, the newly created /myshare appears as «share» with the files therein.
Thanks for the FYI and will def. check out the link since another ubuntu mchine will soon be joining this network.
Big thanks again!
«/etc/samba/smb.conf.old» below:
Code:
# # Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as # commented-out examples in this file. # - When such options are commented with ";", the proposed setting # differs from the default Samba behaviour # - When commented with "#", the proposed setting is the default # behaviour of Samba but the option is considered important # enough to be mentioned here # # NOTE: Whenever you modify this file you should run the command # "testparm" to check that you have not made any basic syntactic # errors. # A well-established practice is to name the original file # "smb.conf.master" and create the "real" config file with # testparm -s smb.conf.master >smb.conf # This minimizes the size of the really used smb.conf file # which, according to the Samba Team, impacts performance # However, use this with caution if your smb.conf file contains nested # "include" statements. See Debian bug #483187 for a case # where using a master file is not a good idea. # #======================= Global Settings ======================= [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP # server string is the equivalent of the NT Description field server string = %h server (Samba, Ubuntu) # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server # wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no # What naming service and in what order should we use to resolve host names # to IP addresses ; name resolve order = lmhosts host wins bcast #### Networking #### # The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0 # Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes #### Debugging/Accounting #### # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Cap the size of the individual log files (in KiB). max log size = 1000 # If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no # We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0 # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. # security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. encrypt passwords = false # If you are using encrypted passwords, Samba will need to know what # password database type you are using. passdb backend = tdbsam obey pam restrictions = yes # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for # sending the correct chat script for the passwd program in Debian Sarge). passwd program = /usr/bin/passwd %u passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* . # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. pam password change = yes # This option controls how unsuccessful authentication attempts are mapped # to anonymous connections map to guest = bad user ########## Domains ########### # Is this machine able to authenticate users. Both PDC and BDC # must have this setting enabled. If you are the BDC you must # change the 'domain master' setting to no # ; domain logons = yes # # The following setting only takes effect if 'domain logons' is set # It specifies the location of the user's profile directory # from the client point of view) # The following required a [profiles] share to be setup on the # samba server (see below) ; logon path = \%Nprofiles%U # Another common choice is storing the profile in the user's home directory # (this is Samba's default) # logon path = \%N%Uprofile # The following setting only takes effect if 'domain logons' is set # It specifies the location of a user's home directory (from the client # point of view) ; logon drive = H: # logon home = \%N%U # The following setting only takes effect if 'domain logons' is set # It specifies the script to run during logon. The script must be stored # in the [netlogon] share # NOTE: Must be store in 'DOS' file format convention ; logon script = logon.cmd # This allows Unix users to be created on the domain controller via the SAMR # RPC pipe. The example command creates a user account with a disabled Unix # password; please adapt to your needs ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u # This allows machine accounts to be created on the domain controller via the # SAMR RPC pipe. # The following assumes a "machines" group exists on the system ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u # This allows Unix groups to be created on the domain controller via the SAMR # RPC pipe. ; add group script = /usr/sbin/addgroup --force-badname %g ########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this # load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. ; printing = cups ; printcap name = cups ############ Misc ############ # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting ; include = /home/samba/etc/smb.conf.%m # Most people will find that this option gives better performance. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html # for details # You may want to add the following on a Linux system: # SO_RCVBUF=8192 SO_SNDBUF=8192 # socket options = TCP_NODELAY # The following parameter is useful only if you have the linpopup package # installed. The samba maintainer and the linpopup maintainer are # working to ease installation and configuration of linpopup and samba. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & # Domain Master specifies Samba to be the Domain Master Browser. If this # machine will be configured as a BDC (a secondary logon server), you # must set this to 'no'; otherwise, the default behavior is recommended. # domain master = auto # Some defaults for winbind (make sure you're not using the ranges # for something else.) ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash # The following was the default behaviour in sarge, # but samba upstream reverted the default because it might induce # performance issues in large organizations. # See Debian bug #368251 for some of the consequences of *not* # having this setting and smb.conf(5) for details. ; winbind enum groups = yes ; winbind enum users = yes # Setup usershare options to enable non-root users to share folders # with the net usershare command. # Maximum number of usershare. 0 (default) means that usershare is disabled. ; usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones usershare allow guests = yes #======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home director as \serverusername ;[homes] ; comment = Home Directories ; browseable = no # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. ; read only = yes # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. ; create mask = 0700 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. ; directory mask = 0700 # By default, \serverusername shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only "username" can connect to \serverusername # The following parameter makes sure that only "username" can connect # # This might need tweaking when using external authentication schemes ; valid users = %S # Un-comment the following and create the netlogon directory for Domain Logons # (you need to configure Samba to act as a domain controller too.) ;[netlogon] ; comment = Network Logon Service ; path = /home/samba/netlogon ; guest ok = yes ; read only = yes # Un-comment the following and create the profiles directory to store # users profiles (see the "logon path" option above) # (you need to configure Samba to act as a domain controller too.) # The path below should be writable by all users so that their # profile directory may be created the first time they log on ;[profiles] ; comment = Users profiles ; path = /home/samba/profiles ; guest ok = no ; browseable = no ; create mask = 0600 ; directory mask = 0700 [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no # Uncomment to allow remote administration of Windows print drivers. # You may need to replace 'lpadmin' with the name of the group your # admin users are members of. # Please note that you also need to set appropriate Unix permissions # to the drivers directory for these users to have write rights in it ; write list = root, @lpadmin # A sample share for sharing your CD-ROM with others. ;[cdrom] ; comment = Samba server's CD-ROM ; read only = yes ; locking = no ; path = /cdrom ; guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain # an entry like this: # # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom
Last edited by kbrand; February 21st, 2012 at 10:03 PM.
Reason: added code tags since i just leaned how to
-
Re: Another «‘net usershare’ returned error 255:»
First of all:
There are no share defs in your old config, explains why your win pc’s couldn’t see it.Second, please put [ code ] and [ / code ] tags (i put spaces in them to prevent vbulletin from rendering them) around files, makes easier reading.
The config file i gave you is fine, just copy,paste,modify.
Your old config (as it appears) is just the file you get from apt-get install samba
So there’s no point in modifying as it would produce the one i gave you before.Feel free to ask questions (see 2e line of signature).
«Everything that has a beginning, has an end.» —an unexpectedly wise wallpaper
-
Re: Another «‘net usershare’ returned error 255:»
We are talking about 2 entirely different ways to create a samba share:
Classic Shares have share definitions in smb.conf.
Usershares ( aka nautilus-shares ) are created from Nautilus and have share definitions in /var/lib/samba/usershares.
BTW, I can reproduce this error in seconds:
‘net usershare’ returned error 255: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter.
by changing one parameter from true to
encrypt passwords = false
That is what you had in your old smb.conf
sudo apt install libwbclient0=2:4.3.8+dfsg-0ubuntu1 samba-libs=2:4.3.8+dfsg-0ubuntu1 python-samba=2:4.3.8+dfsg-0ubuntu1 samba-common=2:4.3.8+dfsg-0ubuntu1 samba-common-bin=2:4.3.8+dfsg-0ubuntu1 smbclient=2:4.3.8+dfsg-0ubuntu1 libsmbclient=2:4.3.8+dfsg-0ubuntu1 samba=2:4.3.8+dfsg-0ubuntu1
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Будут установлены следующие дополнительные пакеты:
python-dnspython
Предлагаемые пакеты:
bind9 bind9utils ctdb ldb-tools smbldap-tools winbind heimdal-clients
Рекомендуемые пакеты:
samba-dsdb-modules samba-vfs-modules
НОВЫЕ пакеты, которые будут установлены:
python-dnspython samba
Пакеты, будут заменены на более СТАРЫЕ версии:
libsmbclient libwbclient0 python-samba samba-common samba-common-bin
samba-libs smbclient
обновлено 0, установлено 2 новых пакетов, 7 пакетов заменены на старые версии, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 8 195 kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 12,0 MB.
Хотите продолжить? [Д/н]
Пол:1
http://linux.nsu.ru/ubuntu
xenial/main amd64 smbclient amd64 2:4.3.8+dfsg-0ubuntu1 [310 kB]
Пол:2
http://linux.nsu.ru/ubuntu
xenial/main amd64 samba-common-bin amd64 2:4.3.8+dfsg-0ubuntu1 [505 kB]
Пол:3
http://linux.nsu.ru/ubuntu
xenial/main amd64 python-samba amd64 2:4.3.8+dfsg-0ubuntu1 [1 058 kB]
Пол:4
http://linux.nsu.ru/ubuntu
xenial/main amd64 samba-libs amd64 2:4.3.8+dfsg-0ubuntu1 [5 173 kB]
Пол:5
http://linux.nsu.ru/ubuntu
xenial/main amd64 libwbclient0 amd64 2:4.3.8+dfsg-0ubuntu1 [30,4 kB]
Пол:6
http://linux.nsu.ru/ubuntu
xenial/main amd64 libsmbclient amd64 2:4.3.8+dfsg-0ubuntu1 [53,2 kB]
Пол:7
http://linux.nsu.ru/ubuntu
xenial/main amd64 samba-common all 2:4.3.8+dfsg-0ubuntu1 [81,0 kB]
Пол:8
http://linux.nsu.ru/ubuntu
xenial/main amd64 python-dnspython all 1.12.0-1 [85,2 kB]
Пол:9
http://linux.nsu.ru/ubuntu
xenial/main amd64 samba amd64 2:4.3.8+dfsg-0ubuntu1 [900 kB]
Получено 8 195 kБ за 1с (5 094 kБ/c)
Предварительная настройка пакетов …
dpkg: предупреждение: снижение версии smbclient с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
(Чтение базы данных … на данный момент установлено 238546 файлов и каталогов.)
Подготовка к распаковке …/smbclient_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается smbclient (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
dpkg: предупреждение: снижение версии samba-common-bin с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
Подготовка к распаковке …/samba-common-bin_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается samba-common-bin (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
dpkg: предупреждение: снижение версии python-samba с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
Подготовка к распаковке …/python-samba_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается python-samba (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
dpkg: предупреждение: снижение версии samba-libs:amd64 с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
Подготовка к распаковке …/samba-libs_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается samba-libs:amd64 (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
dpkg: предупреждение: снижение версии libwbclient0:amd64 с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
Подготовка к распаковке …/libwbclient0_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается libwbclient0:amd64 (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
dpkg: предупреждение: снижение версии libsmbclient:amd64 с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
Подготовка к распаковке …/libsmbclient_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается libsmbclient:amd64 (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
dpkg: предупреждение: снижение версии samba-common с 2:4.3.11+dfsg-0ubuntu0.16.04.6 до 2:4.3.8+dfsg-0ubuntu1
Подготовка к распаковке …/samba-common_2%3a4.3.8+dfsg-0ubuntu1_all.deb …
Распаковывается samba-common (2:4.3.8+dfsg-0ubuntu1) на замену (2:4.3.11+dfsg-0ubuntu0.16.04.6) …
Выбор ранее не выбранного пакета python-dnspython.
Подготовка к распаковке …/python-dnspython_1.12.0-1_all.deb …
Распаковывается python-dnspython (1.12.0-1) …
Выбор ранее не выбранного пакета samba.
Подготовка к распаковке …/samba_2%3a4.3.8+dfsg-0ubuntu1_amd64.deb …
Распаковывается samba (2:4.3.8+dfsg-0ubuntu1) …
Обрабатываются триггеры для man-db (2.7.5-1) …
Обрабатываются триггеры для libc-bin (2.23-0ubuntu7) …
Обрабатываются триггеры для systemd (229-4ubuntu16) …
Обрабатываются триггеры для ureadahead (0.100.0-19) …
ureadahead will be reprofiled on next reboot
Обрабатываются триггеры для ufw (0.35-0ubuntu2) …
Настраивается пакет samba-common (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет libwbclient0:amd64 (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет samba-libs:amd64 (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет libsmbclient:amd64 (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет smbclient (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет python-samba (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет samba-common-bin (2:4.3.8+dfsg-0ubuntu1) …
Настраивается пакет python-dnspython (1.12.0-1) …
Настраивается пакет samba (2:4.3.8+dfsg-0ubuntu1) …
Job for smbd.service failed because the control process exited with error code. See «systemctl status smbd.service» and «journalctl -xe» for details.
invoke-rc.d: initscript smbd, action «start» failed.
dpkg: ошибка при обработке пакета samba (—configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
Обрабатываются триггеры для libc-bin (2.23-0ubuntu7) …
Обрабатываются триггеры для systemd (229-4ubuntu16) …
Обрабатываются триггеры для ureadahead (0.100.0-19) …
Обрабатываются триггеры для ufw (0.35-0ubuntu2) …
При обработке следующих пакетов произошли ошибки:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
наверное буду заново ставить дистр без обновлений во время установки. опять попробую расшарить папки. посмотрю на ошибки и помучаю самбу. может быть к чему и приведёт…
Translation(s): Русский
SystemAdministration
Contents
-
- Установка
- Настройка
- Решение неполадок
-
Неполадки
- Заключение
- Ссылки
Данное краткое руководство посвящено быстрой базовой настройке Samba.
Samba — пакет программ, которые позволяют обращаться к сетевым дискам и принтерам на различных операционных системах по протоколу SMB/CIFS. Имеет клиентскую и серверную части. Является свободным программным обеспечением, выпущена под лицензией GPL.
Установка
# apt-get install samba
Настройка
Добавляем пользователя в базу самбы:
# smbpasswd -a имя_пользователя
Активируем его:
# smbpasswd -e имя_пользователя
В большинстве случаев, при домашнем использовании, все должно работать и со стандартным smb.conf.
Решение неполадок
Если при попытке создать общий ресурс через Nautilus или Konqueror Вам сообщается об ошибке :
* ‘net usershare’ returned error 255: net usershare: usershares are currently disabled
в таком случае проделайте следующее : откройте для редактирования файл /etc/samba/smb.conf и отредактируйте секцию [global] следующим образом :
[global] ..... usershare path = /var/lib/samba/usershare usershare max shares = 100 usershare allow guests = yes usershare owner only = False read only = No guest only = Yes guest ok = Yes .....
Сохраните файл и закройте текстовый редактор. Далее создайте каталог ‘usershare’ где Samba будет хранить списки общих папок, разрешив чтение и запись
# mkdir /var/lib/samba/usershares # chown root:sambashare /var/lib/samba/usershares # chmod 1770 /var/lib/samba/usershares # usermod -a -G sambashare <имя пользователя>
И перезапустите Samba :
# /etc/init.d/samba restart
Завершите сеанс и войдите в него вновь. Теперь у вас должна появиться возможность настраивать общий доступ samba, используя графический интерфейс. Например, в Dolphin вы можете нажать правую кнопку мыши на любом каталоге и предоставить для него общий доступ в сети.
Неполадки
* NT_STATUS_UNSUCCESSFUL
Находим следующую строку в smb.conf
; name resolve order = lmhosts host wins bcast
раскомментируем и изменяем на
name resolve order = lmhosts wins bcast host
в секции [global]
Добавлем в эту же секцию
local master = Yes browseable = yes
Если хотим, чтобы мы были видны в локальной сети
И перезапустите Samba :
# /etc/init.d/samba restart
Если у вас возникли проблемы при доступе к защищенному паролем общему ресурсу на Windows попробуйте добавить
[global] # THE LANMAN FIX client lanman auth = yes client ntlmv2 auth = no
Заключение
Тестируем настройки
testparm -s
# Примерный рабочий smb.conf workgroup = WORKGROUP server string = Samba Server [global] server string = Samba Server usershare path = /var/lib/samba/usershare usershare max shares = 100 usershare allow guests = yes usershare owner only = False read only = No guest only = Yes guest ok = Yes [printers] comment = All Printers path = /var/spool/samba read only = Yes guest ok = Yes printable = Yes browseable = Yes
''read only = No'' возможно правильнее всего вынести из [global] в отдельную шару, в данном случае [music]. Но в этом случае, шары созданные через файловый мененджер и не прописанные непосредственно в smb.conf станут доступны только для чтения
Ссылки
* http://ru.gentoo-wiki.com/wiki/Настройка_Samba_за_5_минут
* https://wiki.archlinux.org/index.php/Samba_(Русский)
CategorySystemAdministration CategoryNetwork CategorySoftware