The smbmount that comes with samba 2.0.5a apparently returns 0 on failure. This happens on my Debian system either using smbmount (which apparently is a wrapper that invokes smbmount-2.2.x) or smbmount-2.2.x itself. Makes it kind of hard to check for failure in a script! :-\ Also, the documentation doesn't cover how to specify a password in the new smbmount, since -P went out of style. The correct way is '-U username%password'. Note that for share-level security, where you don't have a username, '-U %password' works fine.