sevastian at linuxtime.it
Thu Nov 6 10:16:33 GMT 2003
On Thursday 06 November 2003 10:16, Sevastian Foglia wrote:
> On Wednesday 05 November 2003 19:15, you wrote:
> > On Wed, 5 Nov 2003, Sevastian Foglia wrote:
> > > Hello everyone!
> > > I have a problem with authentication by smbc_init.
> > > Is there a function to obtain a password from a username?
> > > I have tried with getpwname but it is not exact way.
> > Ummm, you can't get a password from a username. UNIX/Linux keeps the
> > password hash only, as does Windows. The hash, is, in principle,
> > non-reversible, although, in practice, brute-force or dictionary attacks
> > sometimes work.
> > Can you tell us what you want to do?
> I'm developing an application that uses libsmbclient and samba-vfs.
> When a client connects to a share on my samba server, samba-vfs passes
> the gathered information to a local daemon that uses smbclient to connect
> to another samba server. I have both workgroup and username, but I don't
> have his password. Is there a way to authenticate to the samba server on
> the other side with the supplied username (notice that both servers have
> the same user database) ?
> As written in documentation I found I must initialize the samba client
> library with smbc_init.
> I saw in testsmbc.c that first argument of smbc_init is a function which is
> used to get workgroup and user informations from stdin.
> Now, my application is a daemon and I want nothing is been printed to
> stdout and read from stdin.
More information about the samba-technical