Bug 747374 - winbind startup script fails
Summary: winbind startup script fails
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: samba
Version: 6.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Guenther Deschner
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-19 16:08 UTC by Arthur Coombes
Modified: 2012-07-11 01:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-10 08:19:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
appended -x flag /bin/sh invocation in /etc/init.d/winbind and captured output. (2.35 KB, text/plain)
2011-10-19 16:08 UTC, Arthur Coombes
no flags Details
Output of testparm command on server. (1.46 KB, text/plain)
2011-10-20 11:51 UTC, Arthur Coombes
no flags Details

Description Arthur Coombes 2011-10-19 16:08:40 UTC
Created attachment 529052 [details]
appended -x flag /bin/sh invocation in /etc/init.d/winbind and captured output.

Description of problem: when starting winbind using '/etc/init.d/winbind start' it fails to start however using 'sh /etc/init.d/winbind start' it starts without issue.


Version-Release number of selected component (if applicable): Version 3.5.6-86.el6_1.4


How reproducible: every time


Steps to Reproduce:
1. stop winbind
2. run /etc/init.d/winbind start

  
Actual results:
windbind fails to start

Expected results:

winbind should start

Additional info:

I worked around the issue by creating a start_winbind script which simply invokes
"sh /etc/init.d/winbind start"
and I run that rather than the init script directly.
This seems to work every time.

Comment 2 Guenther Deschner 2011-10-20 11:08:07 UTC
I cannot see that issue, can you post the output of "testparm" somewhere, so I can check if it is related to some special configuration settings ?

Comment 3 Arthur Coombes 2011-10-20 11:51:32 UTC
Created attachment 529250 [details]
Output of testparm command on server.

Comment 4 Guenther Deschner 2011-10-20 13:44:56 UTC
Still not able to reproduce your problem, could you also please paste the output of:

stat /etc/init.d/winbind

and the output of:

rpm -V samba-winbind ?

Thanks.

Comment 5 Arthur Coombes 2011-10-20 14:45:21 UTC
Requested output


# stat /etc/init.d/winbind
  File: `/etc/init.d/winbind'
  Size: 1609            Blocks: 8          IO Block: 4096   regular file
Device: 8a5h/2213d      Inode: 132615      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2011-10-19 16:49:48.236565639 +0100
Modify: 2011-10-19 16:49:48.236565639 +0100
Change: 2011-10-19 16:49:48.245488422 +0100


# rpm -V samba-winbind
S.5....T.    /etc/rc.d/init.d/winbind
......G..    /var/lib/samba/winbindd_privileged

Comment 6 Arthur Coombes 2011-10-20 14:53:19 UTC
full content of /etc/rc.d/init.d/winbind


#!/bin/sh
#
# chkconfig: - 27 73
# description: Starts and stops the Samba winbind daemon
#              #
# pidfile: /var/run/winbindd.pid
# config:  /etc/samba/smb.conf


# Source function library.
. /etc/rc.d/init.d/functions

# Avoid using root's TMPDIR
unset TMPDIR

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1

# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 6

[ -f /etc/sysconfig/samba ] && . /etc/sysconfig/samba

RETVAL=0


start() {
        KIND="Winbind"
        echo -n $"Starting $KIND services: "
        daemon winbindd "$WINBINDOPTIONS"
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbindd || RETVAL=1
        return $RETVAL
}


stop() {
        echo
        KIND="Winbind"
        echo -n $"Shutting down $KIND services: "
        killproc winbindd
        RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbindd
        echo ""
        return $RETVAL
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading smb.conf file: "
        killproc winbindd -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

rhstatus() {
        status winbindd
        return $?
}

# Allow status as non-root.
if [ "$1" = status ]; then
       rhstatus
       exit $?
fi

# Check that we can write to it... so non-root users stop here
[ -w /etc/samba/smb.conf ] || exit 4


case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  status)
        rhstatus
        ;;
  condrestart)
        [ -f /var/lock/subsys/winbindd ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
        exit 2
esac

exit $?

Comment 7 Guenther Deschner 2011-10-20 15:53:58 UTC
(In reply to comment #5)
> Requested output
> 
> 
> # stat /etc/init.d/winbind
>   File: `/etc/init.d/winbind'
>   Size: 1609            Blocks: 8          IO Block: 4096   regular file
> Device: 8a5h/2213d      Inode: 132615      Links: 1
> Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
> Access: 2011-10-19 16:49:48.236565639 +0100
> Modify: 2011-10-19 16:49:48.236565639 +0100
> Change: 2011-10-19 16:49:48.245488422 +0100
> 
> 
> # rpm -V samba-winbind
> S.5....T.    /etc/rc.d/init.d/winbind
> ......G..    /var/lib/samba/winbindd_privileged

Still not able reproduce, sorry.

The rpm -V output indicates that the init script has been modified after the installation. Could you try to reinstall samba-winbind and see if the error still persists ?

Comment 8 Arthur Coombes 2011-10-20 16:16:50 UTC
I have reinstalled winbind 

rpm -V samba-winbind now exits cleanly

The symptoms are unchanged.

Starting using the init script fails

staring using my 'start_winbind' script succeeds.

Comment 10 Guenther Deschner 2011-12-14 15:26:31 UTC
We have just no luck to reproduce it, can you try to run the init script through strace so we get some more information ?

Thanks.

Comment 12 Guenther Deschner 2012-04-25 10:07:30 UTC
Hello,

did you had any luck in reproducing the failure ? Without further information (like strace output) we would need to close this bug in some weeks.

Thanks.

Comment 13 Guenther Deschner 2012-07-10 08:19:05 UTC
No feedback for a long time, sorry, we are closing this bug. Please re-open if you have new information for this bug.

Comment 14 RHEL Program Management 2012-07-10 08:37:06 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 15 RHEL Program Management 2012-07-11 01:53:56 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.


Note You need to log in before you can comment on or make changes to this bug.