Answer the question
In order to leave comments, you need to log in
How to show Ubuntu Server where Samba is installed?
Good day gentlemen.
Prompt how to be with samba.
The essence of the problem is that I have to administer a server on ubuntu server 14.04.5 LTS. It has a file washer, virtual machines, and an Internet gateway.
Actually, there were difficulties with file cleaning. All machines (Windows 7) on the network go to it without problems, and the new computer cannot enter the server in any way.
The problem is that the previous admin installed samba not from the repositories, it seems, but collected it manually.
As a result, all the files are in the /usr/local/samba/ folder:
[email protected]:/usr/local/samba# ls
bin etc include lib private samba.sh sbin share var
[email protected]:/usr/local/samba# cat etc/smb.conf
[global]
#---------------- Логи
max log size = 300
debug level = 1
log file = /usr/local/samba/var/log.%m
#---------------- Общие настройки
netbios name = SERVER
workgroup = DTP
server string = DTP file server
time server = True
wins support = yes
domain master = yes
domain logons = yes
preferred master = yes
local master = yes
logon script = %U.bat
logon home = \\%L\%U\profile
os level = 34
max open files = 10000
#---------------- Доступ на общем уровне и права на ресурсы
hosts allow = 172.16.5.0/255.255.255.0
valid users = nobody, @smbusers, @smbadmins
interfaces = 172.16.5.0/24
bind interfaces only = true
write list = @smbadmins
admin users = @smbadmins
public = no
writable = no
guest account = nobody
#----------------- Имена файлов и атрибуты
dos charset = CP866
unix charset = UTF-8
create mask = 0775
directory mask = 0775
force create mode = 0775
unix extensions = no
wide links = yes
acl group control = yes
inherit owner = yes
inherit permissions = yes
inherit acls = yes
acl allow execute always = yes
passdb backend = smbpasswd
#============================ Share Definitions ==============================
[netlogon]
path = /usr/local/SAMBA/%S
browseable = no
[homes]
comment = Home Directories
path = /usr/local/SAMBA/homes/%u
writable = yes
browseable = no
[scripts]
comment = Logon scripts
path = /usr/local/SAMBA/netlogon
writable = yes
write list = @smbadmins
[control]
comment = Server control
writable = yes
path = /usr/local/SAMBA/%S
write list = @smbadmins
valid users = @smbadmins
#---------------------
[backup]
comment = System backup
writable = yes
path = /usr/local/SAMBA/%S
write list = @smbadmins
[buffer]
comment = File trash
writable = yes
path = /usr/local/SAMBA/%S
write list = @smbusers
[doc]
comment = Documents
writable = yes
path = /usr/local/SAMBA/%S
write list = @smbdoc
[buhgaltery]
comment = Buchgaltery
writable = yes
path = /usr/local/SAMBA/%S
valid users = @smbbuhgaltery
write list = @smbbuhgaltery
[engineer]
comment = Engineer
writable = yes
path = /usr/local/SAMBA/%S
valid users = @smbengineer
write list = @smbengineer
[economist]
comment = Engineer
writable = yes
path = /usr/local/SAMBA/%S
valid users = @smbeconomist
write list = @smbeconomist
[email protected]:/usr/local/samba# smbpasswd
smbpasswd: /usr/local/samba/lib/private/libsamba-modules-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libndr-samba-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libsamba-debug-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libauthkrb5-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libcliauth-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libasn1util-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libgenrand-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
smbpasswd: /usr/local/samba/lib/private/libsamba-sockets-samba4.so: version `SAMBA_4.3.3' not found (required by /usr/local/samba/lib/libgensec.so.0)
[email protected]:/usr/local/samba# aptitude -f install
The following partially installed packages will be configured:
samba
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up samba (2:4.3.11+dfsg-0ubuntu0.14.04.1) ...
smbd start/pre-start, process 5393
start: Job failed to start
invoke-rc.d: initscript samba-ad-dc, action "start" failed.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up samba (2:4.3.11+dfsg-0ubuntu0.14.04.1) ...
smbd start/running, process 5546
start: Job failed to start
invoke-rc.d: initscript samba-ad-dc, action "start" failed.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
samba
[email protected]:~# samba-tool group list
Could not find machine account in secrets database: Failed to fetch machine account password for DTP from both secrets.ldb (Could not find entry to match filter: '(&(flatname=DTP)(objectclass=primaryDomain))' base: 'cn=Primary Domains': No such object: (null)) and from /var/lib/samba/private/secrets.tdb: NT_STATUS_CANT_ACCESS_DOMAIN_INFO
ERROR(ldb): uncaught exception - ldb_search: invalid basedn '(null)'
File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
return self.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/group.py", line 316, in run
attrs=["samaccountname", "grouptype"])
Answer the question
In order to leave comments, you need to log in
I had this. See the logs why samba from the repositories does not start. Most likely, the config in /etc/samba is incompatible, or there is no config at all. Well, delete the old samba altogether, since you made a backup
This is just an example of what will happen if you start working in a package distribution, as in source-based. Installed bubuntu - forget about building from source!
You will have to solve the problem of manually removing samba (and most likely re-entering the domain) and installing it from packages with appropriately corrected config slipped from the old one.
Samba may not have its own users - if the system is configured to use domain accounts via sssd or via winbindd. Your accounts are hell.
OMG, is she also a domain master? Is she the only domain controller or is there still Windows? If she is the only DC, then you need to be veryBe careful - samba's user base is stored in /var/lib/samba (or something like that, there are a lot of files with .tdb extension). If this database is blown out, all users will lose their RIDs and profiles will no longer be available to them ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question