Samba share script advice
This is my first time posting, and just ran into a little problem with samba. Im trying to make a script that will create a / directory, and make that directory a samba share. What I am wondering is if a samba share can even be created in a script. I understand that the /etc/samba/smb.conf has to be editted to create a share, or can be done in Samba gui. Any input is much appreciated. Thank you in advance. :confused:
|
If you want it scripted, then GUI is not really an option. You may want to experiment with >> as this will append data to a file.
If you have file1 and file2 then the following will stick the contents of file1 at the end of file2: Code:
cat file1 >> file2 |
Solved
Ive got it working now. Thanks for the spark mjlouis. This is the code I'm using below that adds to the configuration file. Earlier in the script i prompt for a username, hence the $NAME's.
Code:
echo [$NAME] >> /etc/samba/smb.conf |
All times are GMT -5. The time now is 03:02 AM. |