Page 1 of 1

E: Sub-process /usr/bin/dpkg returned an error code (1)

Posted: 2015-09-18 08:04
by corsairetc
Hello,
I try to instal samba but every time I get this error.

Code: Select all

E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package.  Trying to recover:
Job for smbd.service failed. See 'systemctl status smbd.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: error package samba (--configure):
Here is the journal -xn

Code: Select all

ournalctl -xn
-- Logs begin at Pá 2015-09-18 09:55:54 CEST, end at Pá 2015-09-18 10:03:23 CEST. --
zář 18 10:03:21 lspc01 smbd[1729]: Copyright Andrew Tridgell and the Samba Team 1992-2013
zář 18 10:03:21 lspc01 smbd[1729]: [2015/09/18 10:03:21,  0] ../source3/smbd/server.c:1204(main)
zář 18 10:03:21 lspc01 smbd[1729]: error opening config file '/etc/samba/smb.conf'
zář 18 10:03:21 lspc01 smbd[1729]: failed!
zář 18 10:03:21 lspc01 systemd[1]: smbd.service: control process exited, code=exited status=1
zář 18 10:03:21 lspc01 systemd[1]: Failed to start LSB: start Samba SMB/CIFS daemon (smbd).
-- Subject: Unit smbd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smbd.service has failed.
-- 
-- The result is failed.
zář 18 10:03:21 lspc01 systemd[1]: Unit smbd.service entered failed state.
zář 18 10:03:22 lspc01 sudo[1571]: pam_unix(sudo:session): session closed for user root
zář 18 10:03:23 lspc01 sudo[1746]: server : TTY=pts/0 ; PWD=/home/server ; USER=root ; COMMAND=/bin/j
zář 18 10:03:23 lspc01 sudo[1746]: pam_unix(sudo:session): session opened for user root by server(uid
I was try uptitude -f install
Delete /var/lib/dpkg/info
Nothing help.
How can I solve this problem.

Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

Posted: 2015-09-18 14:06
by reinob
For some reason you don't have any configuration file (/etc/samba/smb.conf).

Try creating one (after all, if you want to use samba, you probably have prepared a configuration already) and then do "apt-get -f install".

Can we assume that this is debian stable with no foreign sources?

Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

Posted: 2015-09-20 18:01
by millpond
There are many variations on samba.conf - be careful of this when googling.

Some of it is counterintuitive - for example you may want to enable 'baduser'.

In general: Give full access to Win printer server (assuming you have one).
Use CIFS to mount Win drives/partitions. You may need to give them permanent IPs (ex.192.168.0.5 for //mymachine/C)

Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

Posted: 2015-09-21 05:20
by corsairetc
Hello, I was copy samba folder from second debian to /etc and the it start to work.