Jump to content

Any LINUX Experts out there? Samba and WinBind Errors

So I've been trying to get a webserver set up and also need to get Samba share to be working. Below is what happens when I try to install any software that touches those two packages. Any ideas other than a clean install to fix this?

 

LL

Link to comment
Share on other sites

Link to post
Share on other sites

Hey,

could you post a bigger screen shot or a copy of the terminal output?

Also helpful would be your distro information

Is this a local server, or is it hosted online?

The output of systemctl status <service> might also be helpful here

How are you trying to install the software? Did you consider containers for this  (Docker)?

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, g el said:

Hey,

could you post a bigger screen shot or a copy of the terminal output?

Also helpful would be your distro information

Is this a local server, or is it hosted online?

The output of systemctl status <service> might also be helpful here

How are you trying to install the software? Did you consider containers for this  (Docker)?

This is a local server that's run out of my basement on my main rig hand me downs.  I run two 24/7 Minecraft servers, for me and the kids, and PLEX server which streams to multiple devices.

 

I will get the output of the systemctl status also.  I have been installing using basic apt-get commands.  I do run off a GUI now but still do most by command line.

 

Server Specs:

CPU: 3.0Ghz Phenom II X4 945

Motherboard:  Asus M5A88-V EVO 

RAM: ADATA 6GB 

Hard Drives: 4x1TB in RAID 6, 320GB for OS

Cooling: Xigmatek Loki

NIC: Intel based dual NIC

 

 

18 minutes ago, Orangeator said:

I cannot read the text... Need a larger screen shot.

 

I will get a bigger screen shot or just copy the terminal output tonight if I can get away.

Link to comment
Share on other sites

Link to post
Share on other sites

Some more questions while you're checking it 

Do you need winbind? Do you have an active directory / domain and you want everone to use their same password to access the shares?

Can you paste the output of uname -a ? This will give the distrubution you are running as well as the kernel, from the apt-get command you mentioned we know it's a debian based, so probably ubuntu? What version of ubuntu is it? is it updated?

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, g el said:

Some more questions while you're checking it 

Do you need winbind? Do you have an active directory / domain and you want everone to use their same password to access the shares?

Can you paste the output of uname -a ? This will give the distrubution you are running as well as the kernel, from the apt-get command you mentioned we know it's a debian based, so probably ubuntu? What version of ubuntu is it? is it updated?

Sorry I forgot to add that, yes it's Ubuntu and running gnome GUI.  It's updated to the last stable release 16.04.  I am making a list of outputs to post tonight.

Winbind is being used in conjecture with Samba through my Webmin admin portal.  All the tech in the house runs off windows, except for a tablet.

Link to comment
Share on other sites

Link to post
Share on other sites

The settings you need to set do depent completely on your network enviroment.

 

Using an Active Directory (What you could set up with Samba4, which is a totally other story), you mainly need to join your server to the domain, add the share and é voílá, you have a samba file server AND you have all your users controlled from one point for every computer in the network (I think webmin can help you a lot on your way there - even if this is a fun way to go to learn a big shit load about modern server enviroments)

 

For everything else, it would be the best to see your config files, log outputs ,and command outputs:

 

cat /etc/samba/smb.conf > /tmp/forumoutput.txt
echo "________smb.conf ends_______" >> /tmp/forumoutput.txt
echo "________smb.log begins______" >> /tmp/forumoutput.txt
cat /var/log/samba.log >> /tmp/forumoutput.txt
echo "________smb.log ends_______" >> /tmp/forumoutput.txt
echo "________smb.status begins______" >> /tmp/forumoutput.txt
service smbd status &1>> /tmp/forumoutput.txt

best way for analysing would be to attach /tmp/forumoutput.txt to your answer (you may need to change your logpath, i'm not sure if it is that easy on ubuntu)

 

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, StarPunk said:

The settings you need to set do depent completely on your network enviroment.

 

Using an Active Directory (What you could set up with Samba4, which is a totally other story), you mainly need to join your server to the domain, add the share and é voílá, you have a samba file server AND you have all your users controlled from one point for every computer in the network (I think webmin can help you a lot on your way there - even if this is a fun way to go to learn a big shit load about modern server enviroments)

 

For everything else, it would be the best to see your config files, log outputs ,and command outputs:

 


cat /etc/samba/smb.conf > /tmp/forumoutput.txt
echo "________smb.conf ends_______" >> /tmp/forumoutput.txt
echo "________smb.log begins______" >> /tmp/forumoutput.txt
cat /var/log/samba.log >> /tmp/forumoutput.txt
echo "________smb.log ends_______" >> /tmp/forumoutput.txt
echo "________smb.status begins______" >> /tmp/forumoutput.txt
service smbd status &1>> /tmp/forumoutput.txt

best way for analysing would be to attach /tmp/forumoutput.txt to your answer (you may need to change your logpath, i'm not sure if it is that easy on ubuntu)

 

Having an active directory controlled network is what I hope to get to.  If we find it's easier to go that route now during this troubleshooting process.  I have no problems with that.  Webmin has a great interface for controlling samba and permissions.  I found it useful so far.  I can already tell you my Samba service is down and won't come back up.  I encountered a lot of issues when I upgraded to 16.04 from what I was previous at 12.04.  To include a pain in the butt install of webmin as it's no longer technically supported.

 

I will get the output of those config files tonight :)

Link to comment
Share on other sites

Link to post
Share on other sites

I would just setup kerberos authentication and create the user from AD that you are using to access the SMB file share on the linux box.

 

 

Can Anybody Link A Virtual Machine while I go download some RAM?

 

Link to comment
Share on other sites

Link to post
Share on other sites

Here's the requested outputs, I hope it helps...

 

Uname -a output

root@CIASERV:/home/agent007# uname -a
Linux CIASERV 4.8.0-37-generic #39-Ubuntu SMP Thu Jan 26 02:27:07 UTC 2017 x86_6                   4 x86_64 x86_64 GNU/Linux
[1]+  Stopped                 service smbd status

 

Error output:

Setting up winbind (2:4.4.5+dfsg-2ubuntu5.2) ...
Job for winbind.service failed because the control process exited with error code.
See "systemctl status winbind.service" and "journalctl -xe" for details.
invoke-rc.d: initscript winbind, action "start" failed.
â winbind.service - Samba Winbind Daemon
   Loaded: loaded (/lib/systemd/system/winbind.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-03-10 13:54:14 EST; 8ms ago
     Docs: man:winbindd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 13514 ExecStart=/usr/sbin/winbindd $WINBINDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 13514 (code=exited, status=1/FAILURE)
 
Mar 10 13:54:14 CIASERV systemd[1]: Starting Samba Winbind Daemon...
Mar 10 13:54:14 CIASERV systemd[1]: winbind.service: Main process exited, code=exited, statu...LURE
Mar 10 13:54:14 CIASERV systemd[1]: Failed to start Samba Winbind Daemon.
Mar 10 13:54:14 CIASERV systemd[1]: winbind.service: Unit entered failed state.
Mar 10 13:54:14 CIASERV systemd[1]: winbind.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package winbind (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up samba (2:4.4.5+dfsg-2ubuntu5.2) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
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.
â smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-03-10 13:54:16 EST; 9ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 13620 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 13620 (code=exited, status=1/FAILURE)
 
Mar 10 13:54:15 CIASERV systemd[1]: Starting Samba SMB Daemon...
Mar 10 13:54:16 CIASERV systemd[1]: smbd.service: Main process exited, code=exited, status=1...LURE
Mar 10 13:54:16 CIASERV systemd[1]: Failed to start Samba SMB Daemon.
Mar 10 13:54:16 CIASERV systemd[1]: smbd.service: Unit entered failed state.
Mar 10 13:54:16 CIASERV systemd[1]: smbd.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package samba (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-3ubuntu1) ...
Errors were encountered while processing:
 winbind
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Config file:

#
# 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. 

#======================= Global Settings =======================

[global]
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	obey pam restrictions = yes
	dns proxy = no
	default = DATA
	unix password sync = yes
	max log size = 1000
	log file = /var/log/samba/log.%m
	winbind trusted domains only = no
	server string = Home Server (Samba, PLEX, SSH, Minecraft)
	panic action = /usr/share/samba/panic-action %d
	passwd program = /usr/bin/passwd %u
	os level = 20
	passdb backend = tdbsam
	security = share
	usershare allow guests = yes
	writeable = yes
	public = yes
	winbind use default domain = yes
	guest account = agent007
	map to guest = bad user
	pam password change = yes
	workgroup = WORKGROUP
	syslog = 0
	encrypt passwords = yes
	netbios name = CIASERV
	server role = standalone server

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of

# server string is the equivalent of the NT Description field

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
   wins support = yes

# 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.

#### 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

# Cap the size of the individual log files (in KiB).

# 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.

# Do something sensible when Samba crashes: mail the admin a backtrace


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller". 
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  


# 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.

# 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).

# 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'.

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or '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 = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# 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

############ 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

# 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

# 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

#======================= 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 directory as \\server\username
;[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, \\server\username 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 \\server\username
# 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





________smb.conf ends_______
________smb.log begins______
________smb.log ends_______
________smb.status begins______

Link to comment
Share on other sites

Link to post
Share on other sites

This looks like your Samba Installation is corrupt.

Quote

dpkg: error processing package samba (--configure):
 subprocess installed post-installation script returned error exit status 1

As far as I see, your Samba Config is ok.

 

I am not a DPKG-Expert, but I would try something like

 

dpkg-reconfigure samba

Link to comment
Share on other sites

Link to post
Share on other sites

Linux experts i know....

(thinks for some time)

ask @leadeater i think he works with samba often (do you?)

anyways, i don't work with linux a lot (many work servers run windows, we have 1-3 virtual systems running linux for some things), but i do know one thing, that this post is useless except for one thing, brighten up peoples day because

deal-with-it-gif26.gif

****SORRY FOR MY ENGLISH IT'S REALLY TERRIBLE*****

Been married to my wife for 3 years now! Yay!

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/12/2017 at 9:33 AM, StarPunk said:

This looks like your Samba Installation is corrupt.

As far as I see, your Samba Config is ok.

 

I am not a DPKG-Expert, but I would try something like

 

dpkg-reconfigure samba

You are right about a broken install.... here's the output of running that command :P

/usr/sbin/dpkg-reconfigure: samba is broken or not fully installed
19 hours ago, samiscool51 said:

Linux experts i know....

(thinks for some time)

ask @leadeater i think he works with samba often (do you?)

anyways, i don't work with linux a lot (many work servers run windows, we have 1-3 virtual systems running linux for some things), but i do know one thing, that this post is useless except for one thing, brighten up peoples day because

deal-with-it-gif26.gif

Thank you, I will send him a message.  Before I ran into an update that broke almost everything, I had initially configured it to serve my network and then didn't touch it other then to add my newest RAID array.

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry but it's been ages since I've dealt with Linux/Samba. I'm more of a Windows guy now. Best I can suggest doing is backing up your samba config and removing it, forcibly if you have to, then reinstall.

Link to comment
Share on other sites

Link to post
Share on other sites

21 hours ago, leadeater said:

Sorry but it's been ages since I've dealt with Linux/Samba. I'm more of a Windows guy now. Best I can suggest doing is backing up your samba config and removing it, forcibly if you have to, then reinstall.

I definitely like your forcible idea, know any posts on how to do it forcibly?

Link to comment
Share on other sites

Link to post
Share on other sites

Using apt you can do a --remove command to uninstall, if it is still not working, make use of the "-f" and "purge" flags to assist you.

System/Server Administrator - Networking - Storage - Virtualization - Scripting - Applications

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/15/2017 at 5:13 AM, Eniqmatic said:

Using apt you can do a --remove command to uninstall, if it is still not working, make use of the "-f" and "purge" flags to assist you.

Thank you, I will try this after I get off work today.  I'd love to get this fixed so I can continue getting my web server set up while the wife is out of state tomorrow. :P

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×