Right now, I am up to so many users and so many shares and particular permissions that can be set in one file. But I am struggling to get beyond the so many to get to the next level, and I am not sure if it is the limit of the OS or if it is a mistake that I have created which prevents me from going over the hurdle. So here follows the file containing so many users and so many shares and their relationships as to accessibility of each share to whatever user. So embedded here, I have copy-pasted the text content of the file that works up to a limited number us users and shares, but when I add a few more pairs of users and shares, and start as a clean slate, and run the file with the added number of users and shares beyond what I know worked, it then appears to fail to work with the increase information. So, unless I have made a mistake, I may have reached a limit. So what is it that I am importing? Here I will attempt to copy-paste it in here somewhere, and I will also attempt to upload it.
But for now, I can roughly describe the specifications of what I want to produce from importing that file as follows:
I want to create six primary users assigned to six staff members. Actually, I need to do much more than six, but for this example that I know works, I want six.
For each primary user, there will be a share assigned that is read only to all other staff. Now that doubles the number of created users from six to twelve. But the additional six users will function as shares. That means that I block or deny access to those additional users thus making them useless as users but useful as shares that users can share with others. So these shares I can think of them as shared folders. But there will be another three shares added that will work something like group folders or sites. So certain users will be members of a club that gets to manage their own group folder. And yet there will be another three shares but semiprivate, you could say, and shareable to non-club members. In total, for the stage, with one file, I will be able to create and manage six users and their shares, totaling 12, and then, you could say, 3 special work “sites” and 3 read only sharable corresponding shares. Altogether, this file can create six primary users and six shareable folders one for each user, and six special folders, you could say.
But how you might ask does one create and distinguish between users and shares? When importing the file, it looks at one line at a time and processes what’s given. And I have good reason to believe that it looks at the list of users to be created in alphabetical order. Also, I have discovered that it requires that one run the file twice, because the first run, it creates the users, the second run it sets the permissions. I am trying to be able to create both users and shares. The distinction is that a user will be signing in, whereas a share is like a folder, and even though the import file requires that any type of folder created gets assigned a password, the way to perfectly distinguish the user from the share is that the share will be blocked by way of the sixth parameter that I call Denied Access or access denied or something like that. In that parameter, I simply list all the shares or users that were created, separated by a colon, as one always has to do in each parameter.
So here is the import file:
Username | password | member | ReadWrite | ReadOnly | AccessDenied | Quotas |
---|---|---|---|---|---|---|
alvaro_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
alvaro_usr | alvaro1223 | alvaro_usr:alvaro_sh:z_ops_xsh:z_ops_sh | camilo_sh:carlos_sh:christian_sh:enrique_sh:vladimir_sh:z_fin_sh:z_hr_sh | camilo_usr:carlos_usr:christian_usr:enrique_usr:vladimir_usr:z_fin_xsh:z_hr_xsh | 20000:0:0 | |
camilo_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
camilo_usr | camilo7530 | camilo_usr:camilo_sh:z_ops_xsh:z_ops_sh | alvaro_sh:carlos_sh:christian_sh:enrique_sh:vladimir_sh:z_fin_sh:z_hr_sh | alvaro_usr:carlos_usr:christian_usr:enrique_usr:vladimir_usr:z_fin_xsh:z_hr_xsh | 20000:0:0 | |
carlos_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
carlos_usr | carlos1336 | carlos_usr:carlos_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh | alvaro_sh:camilo_sh:christian_sh:enrique_sh:vladimir_sh:z_ops_sh | alvaro_usr:camilo_usr:christian_usr:enrique_usr:vladimir_usr:z_ops_xsh | 20000:0:0 | |
christian_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
christian_usr | christian7530 | christian_usr:christian_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh | alvaro_sh:camilo_sh:carlos_sh:enrique_sh:vladimir_sh:z_ops_sh | alvaro_usr:camilo_usr:carlos_usr:enrique_usr:vladimir_usr:z_ops_xsh | 20000:0:0 | |
enrique_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
enrique_usr | enrique1599 | enrique_usr:enrique_sh:z_ops_xsh:z_ops_sh | alvaro_sh:camilo_sh:carlos_sh:christian_sh:z_fin_sh:z_hr_sh | alvaro_usr:camilo_usr:carlos_usr:christian_usr:vladimir_usr:z_fin_xsh:z_hr_xsh | 20000:0:0 | |
vladimir_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
vladimir_usr | vladimir5577 | vladimir_usr:vladimir_sh:z_ops_xsh:z_ops_sh | alvaro_sh:camilo_sh:carlos_sh:christian_sh:enrique_sh:z_fin_sh:z_hr_sh | alvaro_usr:camilo_usr:carlos_usr:christian_usr:enrique_usr:z_fin_xsh:z_hr_xsh | 20000:0:0 | |
z_fin_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
z_fin_xsh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
z_hr_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
z_hr_xsh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
z_ops_sh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 | |||
z_ops_xsh | dummypassword | alvaro_usr:alvaro_sh:camilo_usr:camilo_sh:carlos_usr:carlos_sh:christian_usr:christian_sh:enrique_usr:enrique_sh:vladimir_usr:vladimir_sh:z_fin_xsh:z_fin_sh:z_hr_xsh:z_hr_sh:z_ops_xsh:z_ops_sh | 20000:0:0 |
So the sufix _sh suggests that it is a created user that is repurposed as a share, so that’s why it gets a dummypassword for a password because nobody is going to sign in through that share. The real users are the ones ending in usr and so they get a real password because somebody is going to use it to gain read only access to shares from others. There’s a few special purpose shares, the ones beginning in z and ending in either _sh or _xsh. _xsh means exclusive share because only certain people gain access to those, so those shares are like group resources. But those in the group can share with special folders ending in _sh but they are read only to others outside the group.
I wish I could find others in the world who are attempting to use this feature of the OS to get things done and manage what has been created. Then I would form a group or association of users and try to get WD to support this feature and improve its documentation found in the online users manual, mostly on Appendix A. It’s a pretty good resource but a few difficulties have been found. One is that you don’t use a / character to separate the parameters, instead, what you do need is the tab character to separate parameters. And another thing is that the quota, that’s the seventh and last parameter of the import file, the syntax won’t work as given, through trial and error, I found out that the first number gives you the megabytes, so 20000:0:0 gives me 20 Gigabytes.
I almost forgot to mention a very important point that is nowhere documented unless I am doing something wrong in how I create the file, and that is, that in order for the import file to work, I have to run it twice, the first time it only creates the users and shares, but the permissions are not fully set, so I have to run the same file a second time, and that sets the permissions correctly.
Also I notice that being that the file gets processed in alphabetically order, I suspect, that it will process, that is, create whatever user comes first alphabetically. And so I notice that I am creating a share first, over a user given the alphabetical order. So for example, I have a user alvaro, so I name his user alvaro_usr, and I have a corresponding share for alvaro that I name alvaro_sh. Since alvaro_sh gets processed first over alvaro_usr according to alphabetical rules I assume are built into the process, then the share gets assigned to the user correctly. But if I had named it another way whereby the user got created first, it would be looking for a share that doesn’t yet exist on the first pass. So I am only hinting that it’s possible that what gets created first even on the first run is important. This is because I had another naming scheme and things didn’t go so well. I am only trying to figure out why what I have pasted here worked whereas other ways didn’t. But beyond that, I also want to figure out how to create more users and shares in a more complex file, but the problem is that I have yet to get beyond this size, and hopefully I have not reached a limit of the OS but a failure in my next level file by having introduced an error that keeps it from setting permissions.