-Design MainWindow
-Design & coding AddShare
has been done
.

![]()
Now
In mainwindow by clicking on 'Add a Share' button in toolbar(Ctrl + S), 'Add Share' window appears.
It has three major parts :
-Share Directory
User can browse in system & add favorite folder to share .
-Share Security
By this part ,user can configure access-permision to share folder.
-Share For …
Share For 'all users' is default value but could be changed to
'specified user' option .By selecting 'specified user' ,Samba Users
List appears in buttom(which is extracted from smbpasswd file)
and user can select some specified user for authenticating them
to access the share.

Ok button clicks.
At the first program checks share address ,Is valid or no?,and if it's valid address ,Making share block is second work and at the end
program appends it to smb.conf file.
For Example in this case it's made below share block :
*
[Desktop]
path = /root/Desktop/ToDo
writable = yes
valid users = samba-user1 samba-user2
*
I've test it & AddShare window works well , But Remaining works is so much .I'll talk about them in next post …