How to set-up multiple users

Hi, does anyone have a working example of how the users should be set-up in an import file to create multiple users on the EX 4 and map them to specific shares? The manual isn’t very clear what the text line should actually look like in order for it to import and despite trying to format it in several different ways the EX 4 is still telling me the file format is incorrect.

Basically all I want is to set-up a user with a password and read/write access to a share that already exists.

Apologies if this has been covered elsewhere but it’s not something that appears when I do a community search.

1 Like

Hi,

Take a look at this.

https://support.wdc.com/knowledgebase/answer.aspx?ID=13099

Hi, Thanks for the reply but I’ve already seen that and it doesn’t help.

I have a requirement to upload multiple users at the same time which the manual says I can do and I’ve also got a txt file supplied by WD is supposed to give me the format of the information I need to do the upload. The trouble is it’s not clear from the format information how the actual data in the text file should look?

This is what’s in the manual and the text file but it doesn’t mean anything much:

#user name/user password/user groups/ shared folder(rw)/ shared folder(ro)/ shared folder(deny)/user quota
#user/pw/g1:g2/folder1:folder2/folder3:folder4/folder5:folder6/0:0:0:0
#user quota settings: user quota not set or 0, quota = 0; user quota <= group quota, quota = user quota; user quota > group quota, quota = group quota

What I need is a working example of this file so that I can decipher what the various lines here mean and what I need to include in the file I have?

While the minimum description given in the example files is mostly self explanatory, I would like to see more robust functionality from this path, such as not automatically making all users shares public. This doesn’t seem to provide a 1-1 level of functionality with the gui. Which is really annoying…

Edit: After playing with the format, it seems that creating a user with this method automatically creates a “fake share” whose name matches the user and which is set to public but for which the actual share folder is not yet created. Explicitly adding a share name to the list of rw shares for each user, like user1/pw1/g1/user1:another/… creates a private share with the same name as the user just like adding a user from the ui

Yes, I too would like to actually become skillful at creating and using the import file. I have yet to get mine to work on a My Cloud PR4100, which does provide some clues in a file called import_file.txt with a few examples, as follows:
---- begin import_file.txt:
#Input a user’s information in the following order and separate them by TAB:
#user_name password join_to_groups shared_folder(rw) shared_folder(ro) shared_folder(deny) user_quota
#username pw g1:g2 folder1:folder2 folder3:folder4 folder5:folder6 0:0:0:0
#user quota settings: user quota not set or 0, quota = 0; user quota <= group quota, quota = user quota; user quota > group quota, quota = group quota

==========end of import_file.txt =======

The last line looks like math equations so I don’t know if one is to actually attempt to implement something like that, or if it’s just some guidelines or if-then statements, as if a portion of a piece of code.

Back to say, in case someone is reading this, that I learned that the # at the beginning of each line should not be used. And I learned that running many users tends to cause deletion if there’s some kind of mistake, perhaps a share not yet created, or something more complicated, not sure. But then if running an import file with only one user at a time, what’s the use of doing an import file.

More recently, I learned that the Groups has a similar import file. So I have created a handful of Groups, and I am coming up with an import file for them, have already created a table for the groups on my administrative/management spreadsheet to assign the team members for each group.
I have about 16 users, about 60 shares, and about 6 groups.
Wow! 60 shares? Now I wish there was an import file to easily create the shares. I haven’t found anything like that online, unless there’s a way to use the command line that would bypass the My Cloud NAS web interface. I wonder if there’s a backdoor, going through the NAS’s OS to get all these things done in one mighty script.

And now an update. I had to delete (reformat) the volume to start all over again. I now am no longer trying to create groups for now. I would assume that submitting the import file with all shares set to, say, read-only, that this would switch them so. But nothing happens. Currently, I revised the user and share scheme, and so I now have about 18 users, and about 29 shares, instead of 60 shares.
I have submitted a support case to Western Digital and made it a case for troubleshooting. And basically, I am noting that I am not able to manage the shares through the import file. Here follows a portion of what I submitted to WD for support help:
import file does nothing to change accessibility of shares

I am not able to change the shares accessibility through the import file. That is, the import user file, the file that adds multiple users and is supposed to be able to configure the shares and how these shares are to be accessed by the users, that file is not changing the shares accessibility per user. The current trouble is that I am expecting that, after running the import file, the shares should change their settings from private (deny) to read-only, or read-write, based on what I have on the import file. But the import file that I ran has no effect on the shares. The shares remain as private, and I am expecting them to change to read-only, or read-write. So that is a serious problem, as I want to swiftly be able to change access to shares using the import file. I may be doing something wrong. But take a look at the process I am using as I discuss in what follows.

I am doing a little better in cracking the import user file method of adding multiple users through uploading a text file at a link called “Adding Multiple Users.” I think I have a handle on the text file. It has to be in a very strict format with 7 parameters per line, one line per user, with each parameter separted by a tab.
That import text file, after being submitted, creates not only users with their passwords, but it also is supposed to assign however many shares one wants to give each user with distinct previliges, such as read/write, read only, and deny.
As you may know, that link to add multiple users is found on the Users tab page titled “Set Up Local Network Users”.
As you may learn by reviewing my previous cases, I was having all kinds of difficulties and the last time I was given some phone support. The support did not quite resolve anything, but only suggested running the import file with only one user at a time, which is a ludicrous suggestion considering that it should work with multiple users.
I think the reason why my shares were getting deleted was when after choosing to reformat the disk and while that formatting was not yet finished, I assumed it was finished and I went to run the import file, and that caused the shares to be erased. But after the format had completed and I then created the shares, the shares were not deleted after running the import file. Another issue that I was getting has to do with the groups. I read somewhere, perhaps in the community forum, that groups were no longer supported in version 5 of the OS. So for now, I have abandoned creating groups.

So after establishing all shares, and then switching each share to not public, I ran the import file and it works to add any new user.
And I am expecting that with the import file, I should be able, for each user,
to:
(1) assign shares to be given read-write access, using the fourth parameter.
(2) assign shares to be given read-only access, using the fifth parameter.
(3) assign shares to be denied access, using the sixth parameter.
(4) limit storag, using the final parameter [for example changing 0:0:0:0 to 0:20:0:0 which means changing from unlimited to 20 GB ]

And I am assuming that when I go to “Add Multiple Users” that when I select overwrite duplicate accounts, that it overwrites every parameter for every user listed.

Here are the shares that I created manually:
alvaro,camilo,carlos,christian,enrique,felipe,gusmej,guspard,ivan,jaime,jairo,juan,luisana,maria,mario,sylvia,vlad,fin,it,mark,ops,pay,hr,FIN_,IT_,MARK_,OPS_,PAY_,HR_

The first eighteen sort of correspond to the users that I create, the distinction is that users have a dash at the end, so user alvaro- has a corresponding share alvaro, and alvaro share I want it to be read-write for alvaro- but read-only for everybody else.
So here are the users that I would like to create using the import user file text
alvaro-,camilo-,carlos-,christian-,enrique-,felipe-,gusmej-,guspard-,ivan-,jaime-,jairo-,juan-,luisana-,maria-,mario-,sylvia-,vlad-,info-,ewiadmin
ended on April 25

May 25, 2022
Update: Well, I got it to work for an import user list file consisting of eight users pretty good, but I have to run it twice to get the shares to go with the users correctly. In other words, if the import file is small, then it seems to work. But when I went to do 45 users, then the shares were not assigned to users, everyone was set as public, and I don’t want to have to go through manually setting the shares to private, and the users to access the shares correctly.
And another thing that doesn’t work quite right is the quotas. The only thing that works for quotas is using MB:0:0 so that 20000:0:0 will give me 20GB.
And I am in contact with WD Support but they don’t seem to have experience in this feature. They only go by the documentation, and it seems to be wrong in what works, for example the quota is stated as TB:GB:MB whereas in real life what worked for me was something like MB:0:0 so that 20000:0:0 gives me 20GB.