Re: Connecting to SMB Shares Fails



Thanks so much Alexander!!  gnomevfs-cat is just what I needed :)

Best regards,
Gaurav

On 1/11/07, Alexander Larsson <alexl redhat com> wrote:
On Thu, 2007-01-11 at 16:06 +0530, Gaurav Jain wrote:
> Hi,
>
> I'm trying to connect to a protected SMB share using gnome-vfs-2 but
> it fails with an "Access denied" error.
>
> The file i'm trying to access over SMB is located at
> "smb://gauravj-xp/networkfolder/file.txt" and the user/password to
> access it are 'gaurav' and 'password' respectively.
>
> I'm attaching the code that I have written.  The error that is thrown
> at the terminal is:
> Error Access denied occurred opening location
> smb://gaurav:password gauravj-xp/networkfolder/file.txt
>
> Any help would be really appreciated!
> Thanks,
> Gaurav

Its generally not recommended to put passwords in uris due to security
issues. I don't think the smb backend supports it. You need to implement
the password callbacks to correctly handle the login. For an example,
see the gnomevfs-cat program in later versions of gnome-vfs.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc
                   alexl redhat com    alla lysator liu se
He's a world-famous dishevelled librarian haunted by an iconic dead American
confidante She's a hard-bitten tomboy safe cracker from aristocratic European
stock. They fight crime!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]