Package: autofs
Version: 4.1.4-7

autofs has always refused to mount smbfs correctly at boot time. I thought it 
was some weird problem, since right after starting the system, i could do an 
/etc/init.d/autofs restart and smbfs partition would be mounted correctly 
(using "sudo"). But today I just came up to think that maybe it was because it 
was trying to access samba as root. And hey, I was right! I suggest the 
/etc/init.d/autofs was run as a special "samba" user.

As a quick walkaround I have done the following to make my life easier while no 
official fix exists. So all that people sufffering from my same problem can 
jsut do the same as I did:

1) Make sure you have the following non-debian-standard-packages installed: 
sudo smbfs autofs

2) Add the following to the beggining of /etc/init.d/autofs (right after the 
legal stuff) ->

# This is a walkaround for autofs to work with smbfs from the boot moment
# smbfs doesn't like being mounter by root, so let's hide it
test x$AUTOFSRUNNING != xyes && case "$1" in
start|restart|force-reload|reload)
        test $UID -eq 0 && exec su samba -c "AUTOFSRUNNING=yes sudo 
/etc/init.d/autofs restart"
        exit $?
        ;;
esac

3) Add the following to /etc/sudoers ->

samba   ALL=(root) NOPASSWD: /etc/init.d/autofs

4) Run the following command (as root) ->

useradd -g samba samba

if the above fails, just do ->

useradd samba

And that's it. It should work from the very boot time on next system restart.
I hope that helped.

Greets and please fix this properly!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to