MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Multiuser questions
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    MLDonkey Forum Index -> Development
View previous topic :: View next topic  
Author Message
acidbits
neophyte


Joined: 25 Oct 2006
Posts: 13

PostPosted: Wed Oct 25, 2006 7:37 am    Post subject: Multiuser questions Reply with quote

I've been using mldonkey + web-gmui in two communities who share a DSL Internet connection. Yesterday I noticed mldonkey has multiuser, I've compiled from csv to start testings. Have some questions.

I need to set all users in the same group, without admin privileges. As mldonkey group has admin privileges, is it safe to set "group_admin = false"?

If I have to create another group, which command should I use to move users from one group to another? I know I can do it stopping mldonkey and editing users.ini, but I need to do it without stopping it.

In one community I've got 78 web-gmui/mldonkey users. Right now, If some user wants to get an account with web-gmui/mldonkey, they have to send a SMS to a phone number. I have a script that recieves the SMS and update web-gmui users accounts. With SMS users can change/recover password, delete account, get more slots, etc.

If I move to mldonkey's multiuser, I have to rewrite the entire SMS users account script. And it shouldn't stop mldonkey to edit users.ini to add a new user to a new group.

Thanks for the multiuser!!!
________
SMOKE WEED EVERY DAY


Last edited by acidbits on Tue Feb 22, 2011 6:46 am; edited 1 time in total
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Wed Oct 25, 2006 10:08 am    Post subject: Re: Multiuser questions Reply with quote

Very interesting posting, fascinating what people are doing with MLDonkey Very Happy
acidbits wrote:
I need to set all users in the same group, without admin privileges. As mldonkey group has admin privileges, is it safe to set "group_admin = false"?

Hm, user "admin" is always admin, regardless of group settings
But the multiuser To-Do mentions that group "mldonkey" must also have
admin rights. So you better create a new group for non-admin users.
After the upgrade from non-multiuser MLDonkey all files are owned by
admin:mldonkey, so you would have to change all files anyway.
acidbits wrote:
If I have to create another group, which command should I use to move users from one group to another?

The multiuser stuff is not fully implemented yet, commands to control
groups of users are still missing. But they will be there in 2.8.2.
Lets discuss the implementation (havenīt thought about it much yet):
- new command usergroups <user> <list>, this will overwrite current user group list
- other idea: new commands usergroupadd & usergroupdel <user> <group>, which handle each group seperately
- new command userdefaultgroup <user> <group> to change option
Quote:
user_default_group = New downloads by this user will belong to this group.

acidbits wrote:
In one community I've got 78 web-gmui/mldonkey users. Right now, If some user wants to get an account with web-gmui/mldonkey, they have to send a SMS to a phone number. I have a script that recieves the SMS and update web-gmui users accounts.

Great stuff! Would it be possible to post your scripts to the Wiki after you
ported them be used with multiuser MLDonkey?
acidbits wrote:
With SMS users can change/recover password

- To change password, use command "passwd"
- Recovering the password by MLDonkey command is not possible, you
would have to read users.ini yourself, is this a problem for you?
For discussion: What about a new command which prints passwords of
non-admin users, only accessable by admin users?
acidbits wrote:
delete account, get more slots, etc.

- userdel command exists
- what do you mean with "get more slots"?

Additional note: user_commit_dir option is present but not used, to enable
it apply this patch to CVS: http://savannah.nongnu.org/patch/?5475
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
acidbits
neophyte


Joined: 25 Oct 2006
Posts: 13

PostPosted: Wed Oct 25, 2006 4:02 pm    Post subject: Re: Multiuser questions Reply with quote

spiralvoice wrote:
Very interesting posting, fascinating what people are doing with MLDonkey Very Happy

And it's "just for fun" ... Smile

spiralvoice wrote:

Hm, user "admin" is always admin, regardless of group settings
But the multiuser To-Do mentions that group "mldonkey" must also have
admin rights. So you better create a new group for non-admin users.
After the upgrade from non-multiuser MLDonkey all files are owned by
admin:mldonkey, so you would have to change all files anyway.


Ok. But nothing will go wrong by now if I set it admin_group=false.

spiralvoice wrote:

The multiuser stuff is not fully implemented yet, commands to control
groups of users are still missing. But they will be there in 2.8.2.
Lets discuss the implementation (haven?t thought about it much yet):
- new command usergroups <user> <list>, this will overwrite current user group list
- other idea: new commands usergroupadd & usergroupdel <user> <group>, which handle each group seperately
- new command userdefaultgroup <user> <group> to change option


Here is my wishlist:

- whoami should also display the groups you belong to, and mark in some way (*?) the default one. This will be used by GUI coders to get the groups the user belongs to.
- vd also should display which downloads you own.
- Only admin & admin groups can manage groups, add users to groups, and so on.
- useradd <user> <pass> [list of groups]. First group of the list should be the default one. If list of groups is empty, then add to 'mldonkey' group or to 'none' group or to a new one without admin privileges?
- ugadd <user> <group>. Short commands are faster to write.
- ugdel <user> <group>
- udefgroup <user> <group>.
- Some variable that sets the maximum time a download can last. Eg. Downloads older that 50 days should be canceled automatically by mldonkey.

"more slots" means having more userdls. This feature could be tricky, what happens if a user that has userdls=4, and he has 4 downloads in progress, and we change his userdls=2???

In any way mldonkey should store user passwords in plain text.

spiralvoice wrote:

acidbits wrote:
In one community I've got 78 web-gmui/mldonkey users. Right now, If some user wants to get an account with web-gmui/mldonkey, they have to send a SMS to a phone number. I have a script that receives the SMS and update web-gmui users accounts.

Great stuff! Would it be possible to post your scripts to the Wiki after you
ported them be used with multiuser MLDonkey?

It works like this: Users send a SMS to (fake number) 5555 with a text like:
register <user> <pass>
The company who holds the 5555 service, sends phone#,time,text to a perl-cgi placed in webgmui/mldonkey server. The perl-cgi parses the text and test if someone already has created an account from that phone# (only 1 allowed), if another user has the same name, etc ... if everything is ok then it updates web-gmui SQLtable user_accounts and adds the new one. User gets a SMS back from the script telling whether the operation was ok or not.

As you see this SMS script can't be generic enough to be coded in mldonkey, it depends the way you get the data from the SMS-service-company. What I have to change in mine is to manage users through "telnet localhost 4000" instead of accessing to a mysql table.
________
Vermont Marijuana Dispensaries


Last edited by acidbits on Tue Feb 22, 2011 6:46 am; edited 1 time in total
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Wed Oct 25, 2006 6:03 pm    Post subject: Re: Multiuser questions Reply with quote

acidbits wrote:
spiralvoice wrote:
But the multiuser To-Do mentions that group "mldonkey" must also have admin rights.

This means the core will change admin_group to true of group "mldonkey"
in order to enforce the defaults. The same is valid for user "admin",
if it not exists, its created again when the core starts.
acidbits wrote:
Ok. But nothing will go wrong by now if I set it admin_group=false.

This works now but will not work in the future.
acidbits wrote:
Here is my wishlist:

Lets see.
acidbits wrote:
- whoami should also display the groups you belong to, and mark in some way (*?) the default one. This will be used by GUI coders to get the groups the user belongs to.

Does this patch suite your needs? http://savannah.nongnu.org/patch/index.php?5488
acidbits wrote:
- vd also should display which downloads you own.

You mean a user column in vd in Telnet, right? Why do you need that?
acidbits wrote:
- Only admin & admin groups can manage groups, add users to groups, and so on.

Ok, thats planned anyway.
acidbits wrote:
- useradd <user> <pass> [list of groups]. First group of the list should be the default one. If list of groups is empty, then add to 'mldonkey' group or to 'none' group or to a new one without admin privileges?

Ok, I will try to code that. I did already such a thing but removed the code
because I had problems with it. Lets see if I can do better now.
Small note: users are allowed not to be a member of any group, this would
mean all downloads of the user are private and the user can see nothing but
the own downloads. IMHO this would be a common situation. Therefore
adding groups automatically if ommited here is not planned.
Additional note: Your proposal to use the first group as default_group is a
bad idea. Users can have default_group None but still be a member of
other groups. This way newly started downloads by that user are not visible
for other users. AFAIR this was the reason not to extend command useradd
but use special commands instead to add/remove groups and control user_default_group.
acidbits wrote:
- ugadd <user> <group>. Short commands are faster to write.
- ugdel <user> <group>
- udefgroup <user> <group>.

You could use the alias command to achieve that.
The command names should be self-explaining.
Besides that, is it ok for you to have these commands?
spiralvoice wrote:
- new commands usergroupadd & usergroupdel <user> <group>, which handle each group seperately
- new command userdefaultgroup <user> <group> to change option

acidbits wrote:
- Some variable that sets the maximum time a download can last. Eg. Downloads older that 50 days should be canceled automatically by mldonkey.

This has nothing to do with multiuser stuff, please open a feature request
for it: http://savannah.nongnu.org/task/?group=mldonkey
Please include the possibility to send a cancelation email to the user.
acidbits wrote:
"more slots" means having more userdls. This feature could be tricky, what happens if a user that has userdls=4, and he has 4 downloads in progress, and we change his userdls=2???

Download list of the user is sorted, the files with least percentage finished
or lower download priority are queued. This check takes place once per
minute and is included in the function to enforce max_concurrent_downloads.
When files are removed from download list, i.e. finished, paused or canceled,
the queued files are resumed automatically. You do not have to worry about
this situation, the core will take care of it.
acidbits wrote:
In any way mldonkey should store user passwords in plain text.

This would open a very big security hole and will not be coded. The passwords
are stored md4 encoded in users.ini, you could read them from there.
Or the SMS user would have to sent his/her user password along to change
their accounts or the script must access MLDonkey as admin user.
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Wed Oct 25, 2006 8:50 pm    Post subject: Re: Multiuser questions Reply with quote

spiralvoice wrote:
acidbits wrote:
- whoami should also display the groups you belong to, and mark in some way (*?) the default one. This will be used by GUI coders to get the groups the user belongs to.

Does this patch suite your needs? http://savannah.nongnu.org/patch/index.php?5488

After talking with jave, he is the user who started the multiuser patch, we agreed
to solve your request in a more unix-like way. I replaced the patch already:
Quote:
Multiuser: New commands
- groups -> displays groups of the logged-in user
- dgroup -> displays default group of the logged-in user

_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
atordo
user


Joined: 02 Apr 2003
Posts: 237
Location: Spain

PostPosted: Fri Oct 27, 2006 2:16 am    Post subject: Reply with quote

Just testing the multiuser and it looks very promissing. However, IMHO there should be some actions that a non admin user should not be able to perform:

- Bandwith toggle
- Download priority
- Set release status for a file
- Disconnect from a server

Edit: forgot the server item.
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Fri Oct 27, 2006 7:46 am    Post subject: Reply with quote

atordo wrote:
JIMHO there should be some actions that a non admin user should not be able to perform:

Lets see:
atordo wrote:
- Bandwith toggle

Ok.
atordo wrote:
- Download priority

This would be problematic. As you know an option user_max_concurrent_downloads
exists which limits the number of downloads which can have state downloading
at the same time per user. If the user has more downloads they are queued.
By setting download priorities the user can decide which downloads should
not be queued. Example: user_max_concurrent_downloads 10, the user
has 15 downloads, all priority normal, 5 downloads are queued then.
The user changes the priority of one of the 5 queued downloads to high (10),
this download will be unqueued and the download with least data downloaded
from the 10 previously downloading files will be queued instead.
By restricting download priority to admin users non-admin would loose
control about their queued files.
atordo wrote:
- Set release status for a file

Ok
atordo wrote:
- Disconnect from a server

Ok
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
atordo
user


Joined: 02 Apr 2003
Posts: 237
Location: Spain

PostPosted: Fri Oct 27, 2006 8:56 am    Post subject: Reply with quote

I see. But will a file with high priority take precedence over other user's file with normal priority?

Sorry if the answer to this is obvious, but I've hardly ever used priorities and the wiki page is a bit ambiguous.
Back to top
View user's profile Send private message
pango
Sage


Joined: 31 Oct 2002
Posts: 2436

PostPosted: Fri Oct 27, 2006 9:51 am    Post subject: Reply with quote

atordo wrote:
I see. But will a file with high priority take precedence over other user's file with normal priority?

No, files queueing was rewritten to support multiusers feature.
Back to top
View user's profile Send private message
acidbits
neophyte


Joined: 25 Oct 2006
Posts: 13

PostPosted: Fri Nov 03, 2006 9:57 am    Post subject: Re: Multiuser questions Reply with quote

spiralvoice wrote:

acidbits wrote:
- vd also should display which downloads you own.

You mean a user column in vd in Telnet, right? Why do you need that?


I was thinking about GUIs beeing able to display the downloads a certain user owns, and the group. This way the user will know which downloads he can cancel, pause, etc.

It would be nice if admin logs in through a GUI, and get the list of downloads with the owner/group displayed for each one.

I don't know the way the GUIs get info through port 4001, maybe they don't exec a 'vd' and then parse the output. But they should be able to retrieve this information.

a.
________
Wilmington assembly


Last edited by acidbits on Tue Feb 22, 2011 6:46 am; edited 1 time in total
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Fri Nov 03, 2006 11:25 am    Post subject: Re: Multiuser questions Reply with quote

acidbits wrote:
spiralvoice wrote:
acidbits wrote:
- vd also should display which downloads you own.

You mean a user column in vd in Telnet, right? Why do you need that?

I was thinking about GUIs beeing able to display the downloads a certain user owns, and the group. This way the user will know which downloads he can cancel, pause, etc.

Some thoughts:
- user get filtered file lists

- admin users always get the full list and they can execute all commands,
for them adding a new column makes no sense

- non-admin user user1 being member of group1 can see files with
file_group group1 but file_owner <> user1. User1 can not execute commands
on this file.
In this situation your proposal would make sense, but I am thinking about
keeping the vd list as small as possible. How about using a different
color for displayed but unmanagable files?
File_owner:File_group is displayed however in vd #file_num so external
GUIs which use Telnet protocol can still parse them. I know its easier to
parse the complete vd list, but the main purpose of Telnet is to present
informations to a user, not to feed GUIs. Because Telnet output is due to
change without notice all GUIs which use it will break, they should use the
GUI binary protocol which has its own backward-compatible standard.
acidbits wrote:
It would be nice if admin logs in through a GUI, and get the list of downloads with the owner/group displayed for each one.

Despite my opinion writen about adding a new column is possible of
course, depending of the necessity on your part.
One question, the group can be None, this means the file is private for the
user and no other non-admin user can see it, independent of any group
memberships. How should the user_group column be displayed: "user" or "user:none"?
acidbits wrote:
I don't know the way the GUIs get info through port 4001, maybe they don't exec a 'vd' and then parse the output. But they should be able to retrieve this information.

Port 4001 supports a binary protocol which already transfers user:group data.
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
acidbits
neophyte


Joined: 25 Oct 2006
Posts: 13

PostPosted: Fri Nov 03, 2006 12:39 pm    Post subject: Re: Multiuser questions Reply with quote

By now I'm not going to write or patch any of the current GUIs, just want GUI coders have all they need to support multiuser in their GUIs.

As soon as mldonkey's multiuser has implemented some of the features discussed in this post (usergroupadd, userdefaultgroup, etc.), I'm going to migrate from web-gmui to mldonkey's multiuser in my 80 users server. At this point, I need to have some GUI that supports multiuser display in the downloads, so users easily identify what downloads own.

All of 80 users will be in the same group. The server has an average of 100 current downloads. To me is interesting that GUIs can show/sort the downloads in someway so users can identify easily which of them are theirs.
________
HONDA CR750


Last edited by acidbits on Tue Feb 22, 2011 6:46 am; edited 1 time in total
Back to top
View user's profile Send private message
atordo
user


Joined: 02 Apr 2003
Posts: 237
Location: Spain

PostPosted: Fri Nov 03, 2006 4:42 pm    Post subject: Re: Multiuser questions Reply with quote

acidbits wrote:
At this point, I need to have some GUI that supports multiuser display in the downloads, so users easily identify what downloads own.


Last version of sancho does.
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Mon Nov 06, 2006 10:26 pm    Post subject: Reply with quote

New patch: https://savannah.nongnu.org/patch/index.php?5526
among other stuff:
Quote:
- implement new commands
- usergroupadd <user> <group> : add a group to a mldonkey user
- usergroupdel user> <group> : remove a group from a mldonkey user
- userdgroup <user> <group> : change user default group
- groupdel <group> : remove an unused mldonkey group
- groupadmin <group> <true> : change group admin status

I still have to code the user:group columns in the GUI. I will make them
manditory in Telnet and optional (yet another html_mods_vd_* options Twisted Evil )
in HTML interface: html_mods_vd_user & html_mods_vd_group

Compared to this patch that is a small change.
Please test this big (110kb) patch for its functionality.
Without this patch well tested I will not release 2.8.2 because important
multiuser functions are implemented with it.

The GUI columns will follow within the next update to this patch,
I will drop an note here if its ready. Meanwhile please test the patch.
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
atordo
user


Joined: 02 Apr 2003
Posts: 237
Location: Spain

PostPosted: Tue Nov 07, 2006 10:48 am    Post subject: Reply with quote

Does this patch have to be applied to current CVS source, or will updating to latest CVS just do it?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Development All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Sourceforge.net Logo