This post is more than 5 years old
1 Rookie
•
47 Posts
0
1923
August 17th, 2010 08:00
Script to create bunch of cifs shares on Celerra
Folks,
Can anybody provide me a quick batch script that will read the commands line by line from a text file and execute it. The commands in the text file will be to create new cifs shares on celerrra as follows:
------------------------------------------------------------------------------------------------------------------
server_export -Protocol cifs -name
server_export -Protocol cifs -name
server_export -Protocol cifs -name
server_export -Protocol cifs -name
-----------------------------------------------------------------------------------------------------------------
Username and password is the default nasadmin on the celerra.
P.S: Is there a way to specify to assign a CIFS server to the share in the above command, so that the share is accessible only through that CIFS server?.
Thanks for all your help
dynamox
9 Legend
•
20.4K Posts
0
August 17th, 2010 09:00
if you already have a file ready with the command and proper sharenames/paths ..simply ssh into Control Station , highlight all the commands from your text file and simply paste them into your ssh window. Try with 2/3 lines so you are happy with the results.
Rainer_EMC
4 Operator
•
8.6K Posts
1
August 17th, 2010 08:00
See the netbios= option in „man server_export“
Or create one using the GUI and do a tail /nas/log/cmd_log
Rainer
white221g
1 Rookie
•
47 Posts
0
August 17th, 2010 09:00
I will type the commands to create individual shares in a text file, one command per line, i just need the script to read that file and execute it one by one to create the cifs share. Let me know if you think there is a better way to do it.
dynamox
9 Legend
•
20.4K Posts
0
August 17th, 2010 09:00
you want provide a list of share names and paths and then run them through a loop or something like ?