Topic: How to create 2 users using the same folder with MySecureShell

Usually using Linux changing the same UID works fine. I tried with MySecureShell and it dosn't work. Please any comments how to. Thanks

Re: How to create 2 users using the same folder with MySecureShell

Hi,

MySecureShell use default path of user, so it should work.

Can you past your configuration file ?

Re: How to create 2 users using the same folder with MySecureShell

Hi,
Here the senario:
Each folder has 3 users
I tried in two ways one the default sftp_conf and the other using users in vain.
After few days changing the HOME path did work at all!?
I get always the same path when I create a user /home/$user while my path is /home/test/$user

Using the default sftp_conf and change manually in to the /etc/group adding users on the group and on the /etc/passwd users have the same UID

here the file /etc/passwd

test01:x:1008:1011::/mnt/work/home/test/:/bin/MySecureShell
test02:x:1008:1011::/mnt/work/home/test/:/bin/MySecureShell

Here the file /etc/group

test:x:1008:test01,test02
test01:x:1011:
test02:x:1011:

I tried also with different UID and same result.

here the sftp_conf

## MySecureShell Configuration File ##
#Default rules for everybody
<Default>
        <User test01>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/test
        </User>

        <User test02>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/test
        </User>

       <User test03>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/test
        </User>

        <User test04>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/sftp
        </User>
       
       <User test05>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/sftp
        </User>

      <User test06>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/sftp
        </User>
</Default>

__________________________________________

In additional I tried also adding a group like this at the end:

<Group test>
        Download                1m
        Upload                  0
        StayAtHome              true
        VirtualChroot           true
        LimitConnection         5
        LimitConnectionByIP     1
</Group>
<Group sftp>
        Download                0
        Upload                  0
        StayAtHome              true
        VirtualChroot           true
        LimitConnection         5
        LimitConnectionByIP     1
</Group>

Thanks for your help

Re: How to create 2 users using the same folder with MySecureShell

Hi,

mami wrote:

Hi,
Here the senario:
Each folder has 3 users
I tried in two ways one the default sftp_conf and the other using users in vain.
After few days changing the HOME path did work at all!?

Strange because it should work hmm

mami wrote:

<Default>
        <User test01>
...
        </User>
</Default>
...

Ok just one thing, you can't have 2 tag, of level 1, opened in same time.


Default tag exist to ensure default value for everybody. After this tag you can override properties for a special user/group/ip.
By sample, your config file became:

<Default>
        Download                100k
        Upload                  0
        StayAtHome              true    #limit client to his home
        VirtualChroot           true    #fake a chroot to the home account
        LimitConnection         10      #max connection for the server sftp
        LimitConnectionByUser   5       #max connection for the account
        LimitConnectionByIP     5       #max connection by ip for the account
        Home                    /mnt/work/home/test
</Default>


<Group test>
        Download                1m
        LimitConnection         5
        LimitConnectionByIP     1
</Group>
<Group sftp>
        Download                0
        LimitConnection         5
        LimitConnectionByIP     1
</Group>
mami wrote:

Thanks for your help

No problem wink

Re: How to create 2 users using the same folder with MySecureShell

Works fine thanks

Re: How to create 2 users using the same folder with MySecureShell

Great big_smile