CIFS Shares batch creation

Created: Sep 11, 2019 10:17:21Latest reply: Sep 11, 2019 11:40:34 97 3 0 0
  Rewarded Hi-coins: 0 (problem resolved)

Hello,

I know it's possible to create CIFS shares in batch by editing a text configuration file, which basically is a sequence of shell commands to be run one after another.


I've had issues with this because of spaces in names of user groups and folder paths... I've tried to add "" or '' but it didn't work.

Does anyone know how can this be done? I've searched online and found little to no documentation regarding shell commands.


These are two examples of failing commands:

create share cifs name=Camp Pubb local_path=/Dipartimentale/Camp Pubb file_system_id=0;

create share_permission cifs access_name=@domain\shares admins share_id=2 permission_type=all_control;


Thanks for any hint


Ale

  • x
  • convention:

Featured Answers
stephen.xu
Admin Created Sep 11, 2019 11:30:08 Helpful(0) Helpful(0)

Hi, Ale

When you create share cifs, The space cannot be in the name of CIFS share, because the system regards the space as the separator of the parameter. The space cannot be in the name of folder in file system,too.

If you want to get more information about the command, you can see the ducument.

  • x
  • convention:

All Answers
Peterhof
Peterhof Created Sep 11, 2019 10:50:11 Helpful(0) Helpful(0)

Hello!
Try to use:
%20
Backslash (\) before the space.
But I am not sure that this will help...
  • x
  • convention:

stephen.xu
stephen.xu Admin Created Sep 11, 2019 11:30:08 Helpful(0) Helpful(0)

Hi, Ale

When you create share cifs, The space cannot be in the name of CIFS share, because the system regards the space as the separator of the parameter. The space cannot be in the name of folder in file system,too.

If you want to get more information about the command, you can see the ducument.

  • x
  • convention:

stephen.xu
stephen.xu Admin Created Sep 11, 2019 11:40:34 Helpful(0) Helpful(0)

It does not work.

CIFS

This article contains more resources

You need to log in to download or view. No account?Register

x
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login