| by SuperBonBon |
|
User settings
Add/remove users. > Next step
Add/remove users.
Server configuration files are using the users to enclose the list of users that are given access to the server.
Each user XML configuration contains a user settings for the server. The user name is a regular expression and should match a name that a user could provide. The user will be identified using an entry in the authentication realm defined for the server.
The user settings let you define the maximum number of connection per user class, if it must match a certain IP address to connect, the timeout value for the user's maximum upload/download rate and finally if the user has a ratio.
The account setting is important for ratio :
If the account setting is set to true, all the credits will be assigned to the user name, meaning that all
user logged with the same user name share the same credits amount.
When the account setting is set to false, all the credits will be assigned
to the IP address for the given user name.
Here is a small example where 3 users are defined :
<server xmlns="http://www.sbbi.net/jafs/1.0/jafs-server"
...
code="sample_server" ... >
...
<authRealm name="xml"/>
<users>
<user account="false" maxConnNb="1" name="user1">
<ipAddress value="192.168.1.34"/>
<timeOut value="60"/>
<maxUploadRate value="60"/>
<maxDownloadRate value="10"/>
<ratio credit="0" scale="1" value="false"/>
</user>
<user account="false" maxConnNb="2" name="user2">
<ipAddress value="192.168"/>
<timeOut value="80"/>
<maxUploadRate value="-1"/>
<maxDownloadRate value="-1"/>
<ratio credit="20000" scale="2" value="true"/>
</user>
<user account="true" maxConnNb="-1" name="user3">
<ipAddress value=""/>
<timeOut value="200"/>
<maxUploadRate value="-1"/>
<maxDownloadRate value="-1"/>
<ratio credit="0" scale="1" value="false"/>
</user>
</users>
...
</server>
As you can see with the example above, simply add/remove user blocks to effectively add/remove users from your server. Using a regular expression ( name="user[1-3]" ), the following single configuration entry could be used to configure user 1,2 and 3 :
<server xmlns="http://www.sbbi.net/jafs/1.0/jafs-server"
...
code="sample_server" ... >
...
<authRealm name="xml"/>
<users>
<user account="false" maxConnNb="1" name="user[1-3]">
<ipAddress value=""/>
<timeOut value="60"/>
<maxUploadRate value="60"/>
<maxDownloadRate value="10"/>
<ratio credit="0" scale="1" value="false"/>
</user>
</users>
...
</server>
Next step
The final step will let you define user file system rights.








