rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: AYEHAN on November 12, 2008, 07:50:11 PM

Title: Mass Account Creation
Post by: AYEHAN on November 12, 2008, 07:50:11 PM
is it possible to add a list of account in one click?

like id.txt have user id password each in 1 line and hfs will create thoise account automatic

user1 password
user2 password

like this
Title: Re: Mass Account Creation
Post by: Foggy on November 13, 2008, 07:16:26 AM
I suppose it would be possible to do with macro but I could not say an exact piece of code.
Title: Re: Mass Account Creation
Post by: rejetto on November 15, 2008, 03:51:01 PM
you can quit hfs and try editing your hfs.ini
the line starting by "accounts="
Title: Re: Mass Account Creation
Post by: Ukyo on November 25, 2008, 08:17:05 PM
you can quit hfs and try editing your hfs.ini
the line starting by "accounts="
But the user and the password are encrypted in a single statement.

It's possible to pass user/password to the .ini in plain-text? 
What's the format? (username:password gives me garbage on the users menu on HFS)


Thanks in advance.
Title: Re: Mass Account Creation
Post by: rejetto on November 25, 2008, 11:04:21 PM
ah, you are right :(
at the moment plain-text is not supported.
but in next 2.3 build it will!

the format is a standard "base64".
my default text editor (pspad) knows how to encode and decode it.
anyway, you'd better wait for the next build.

since build #216 it will be possible to add a new account by just appending this text to the "accounts=" line
;login:myusername:mypassword

Title: Re: Mass Account Creation
Post by: Mars on November 25, 2008, 11:20:02 PM
put a menuitem to encode or not the accounts in hfs.ini

don't forget that an account has different tags to manage it
Title: Re: Mass Account Creation
Post by: rejetto on November 26, 2008, 09:27:17 AM
the solution i described above (and already accomplished) doesn't require any menu item
Title: Re: Mass Account Creation
Post by: Ukyo on November 26, 2008, 01:52:21 PM
With the help of the all-mighty Notepad++ (and MIME Tools plugin) I've constructed a (very long) string with the logins/passwords encoded in base64, and passed it to the hsf.ini file.

It works like a charm!  ;D

Thanks Rejetto!
Title: Re: Mass Account Creation
Post by: rejetto on November 26, 2008, 03:36:12 PM
next build, other than supporting plain text, will consider enabled accounts (where not specified).
i guess that you got all your accounts disabled.
Title: Re: Mass Account Creation
Post by: Ukyo on November 26, 2008, 04:04:35 PM
i guess that you got all your accounts disabled.
I've done my homework watching what happens with "accounts=" when you create an user with the GUI ;D
I've passed also the options.  It was like:
Code: [Select]
accounts=login:base64user:pass|enabled:yes|no-limits:no;login:base64user2:pass2|enabled:yes|no-limits:no; (etc)
BTW, it'd great to have an option to bulk register users/folder permissions... It was pretty painful to manually assign the view/upload permissions manually for 38 users and 3 folders (intranet use)  :P

I think something in the like of SAMBA for permissions on folders could work pretty well, don't you?
Code: [Select]
[salesdoc]
path = /home/shared/sales
write list = rocky tony
Title: Re: Mass Account Creation
Post by: rejetto on November 29, 2008, 12:33:39 AM
BTW, it'd great to have an option to bulk register users/folder permissions... It was pretty painful to manually assign the view/upload permissions manually for 38 users and 3 folders (intranet use)  :P

uh... i understand the problem.
next build wil be able to set permissions by the macros language.
better than nothing.

Quote
I think something in the like of SAMBA for permissions on folders could work pretty well, don't you?
Code: [Select]
[salesdoc]
path = /home/shared/sales
write list = rocky tony

and where do you put this piece of text?
Title: Re: Mass Account Creation
Post by: AYEHAN on November 29, 2008, 07:47:26 PM
Quote
It was pretty painful to manually assign the view/upload permissions manually for 38 users and 3 folders (intranet use)  :P

and i have 81 folder's with 30,000+ files :(
Title: Re: Mass Account Creation
Post by: rejetto on November 30, 2008, 02:41:51 PM
did you know that you can select 81 folders and then set permissions?
that will apply to all folders you selected
Title: Re: Mass Account Creation
Post by: AYEHAN on December 01, 2008, 04:57:58 PM
oh yes i knew that
its a great option.

can i use it to allow disallow on folders but ppl can see all the folders on main or say root/?
Title: Re: Mass Account Creation
Post by: rejetto on December 01, 2008, 05:00:28 PM
it depends on the options "list protected resources only for allowed..."
Title: Re: Mass Account Creation
Post by: AYEHAN on December 01, 2008, 05:09:33 PM
i tried it
checking/inchecking list protected item but no luck

isleted all folder and set permissions
but when i do that and set / to annonymous it still have a locksign

i want every one to see all shares but the only person who can download is .. who have a valid account
Title: Re: Mass Account Creation
Post by: rejetto on December 01, 2008, 05:14:27 PM
if that's what you want, then you have to DISABLE "list protected..." and set the permission for the valid account.

if the lock icon is in the HFS window, that's normal.
if it's in the browser, then it means you are not logged in with the valid account.
Title: Re: Mass Account Creation
Post by: AYEHAN on December 01, 2008, 05:24:19 PM
:) thanks alot

i will try it in morning from office and will let u know
Title: Re: Mass Account Creation
Post by: Ukyo on December 02, 2008, 02:58:39 PM
Quote
I think something in the like of SAMBA for permissions on folders could work pretty well, don't you?
Code: [Select]
[salesdoc]
path = /home/shared/sales
write list = rocky tony

and where do you put this piece of text?
The meaning of that part of the post, was a feature request or something like that :)
SAMBA (http://en.wikipedia.org/wiki/Samba_(software)) has a smb.conf file where you define all the filesharing options, permissions and folders shared.
Title: Re: Mass Account Creation
Post by: d2008 on December 07, 2008, 04:46:29 PM
I suppose it would be possible to do with macro but I could not say an exact piece of code.

Would be nice! :D