Re: Dynamic SMB location in gollem backend
Jan Schneider <[email protected]> Wed, 08 Jan 2014 13:12:56 +0100
| Newsgroups | gmane.comp.horde.gollem |
|---|---|
| Message-ID | <[email protected]> |
Zitat von Paul De Vlieger <[email protected]>: > Le mar. 07 janv. 2014 02:10:53 CET, Matthew a écrit : >> >> Been setting up a new horde install, with imp, gollem and others. >> Authentication is imp-based, with the main horde username being >> [email protected] - and then luckily the hordeauth parameter in >> the backend >> config allows me to then just take the my.name which my SMB back >> end requires >> for login. >> >> All good, working well with the 3 general shares on my server - each one >> getting a separate backend entry along the lines of: >> >> $backends['smbdocuments'] = array( >> 'disabled' => false, >> 'name' => 'Documents', >> 'driver' => 'smb', >> 'shares' => true, >> 'hordeauth' => true, >> 'params' => array( >> 'hostspec' => 'localhost', >> 'share' => 'documents', >> 'port' => 139, >> 'smbclient' => '/usr/bin/smbclient', >> ) >> >> However, each user also has their own private share, which in my setup >> (Zentyal) must be accessed at localhost/my.name - so I need >> something like this: >> >> $backends['home'] = array( >> 'disabled' => false, >> 'name' => 'My home folder', >> 'driver' => 'smb', >> 'shares' => true, >> 'hordeauth' => true, >> 'params' => array( >> 'hostspec' => 'localhost/my.name', >> 'share' => '', >> 'port' => 139, >> 'smbclient' => '/usr/bin/smbclient', >> ) >> >> Hardcoding this with my own name works just fine. But of course I need the >> my.name to reflect the logged in user. I can't quite figure out >> how/where/when >> I can do this - there don't seem to be hooks for gollem, and I >> don't think the >> global variables which would allow me to do something like: >> >> 'hostspec' => 'localhost/'.$GLOBALS['registry']->getAuth(true), >> >> Because that info isn't there yet when this backend config gets called. Any >> ideas as to how to achieve this? >> >> MTIA, Matthew >> > > Works for me with username: > 'share' => $_SESSION['horde']['0auth/authId'], > 'host' => 'localhost', $GLOBALS['registry']->getAuth() would be the correct way, but I wonder if this is necessary at all. Unless you have a really strange Samba setup, all you need to do is to create a "homes" share (or how ever you have named the personal user shares). -- Jan Schneider The Horde Project http://www.horde.org/ https://www.facebook.com/hordeproject -- gollem mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]