Yes, you are editing files in memory.
To make your changes persistent across reboots the files must be on disk, i.e., you need to install, using the webUI, one Alt-F package on disk (or on a USB dedicated flash pen, recommended) .
Then you need to execute the commands (read the Customize Firmware wiki)
aufs.sh -n
cp /etc/init.d/S61smb /Alt-F/etc/init.d/S61smb
aufs.sh -r
and now you can edit /etc/init.d/S61smb (*NOT* /Alt-F/... read its README.txt).
At powerup, the standard init script will be started, but latter on when the disk where the Alt-F folder is is discovered, all existing init.d scripts there will be launched with the "restart" option.
This allows existing packages in the firmware to be updated on disk, without the need for a new Alt-F release and a re-flash.
PS: I'm not certain that you want to disable nmbd. And it is not using more memory, it is in fact a shared binary, as smbd also is:
ls -l /usr/sbin/nmbd
/usr/sbin/nmbd -> samba_multicall
Thanks!