I'm creating a bash script to automount remote NT Partitions via samba. I have configured my /etc/nsmb.conf so that the passwords are automatically looked up. A snippet of my /etc/nsmb.conf looks like this:
The command I use in the bash script to mount the Shares is:
mount_smbfs //ADMINISTRATOR@NTSERVER1/Share$ /root/mnt/NTSERVER1
All the above work as a charm when the password for the ADMINISTRATOR at the remote NTSERVER is not null. However, we have a box that has a passwordless Administrator account. We call this Dummy ;) When I try to mount Dummy's Share using the bash script I mentioned earlier, it refuses to mount it unless I press the CR as it prompts for password. I'm mounting the share as normal with:
mount_smbfs //ADMINISTRATOR@DUMMY/Share$ /root/mnt/Dummy
Password: [here I press the CR and it mounts it just fine]
I tried adding the following to my /etc/nsmb.conf but with no luck:
As you noticed, I tried to leave the password field blank but the script again prompted me for password.
What I want to do is somehow pass a Newline to the mount_smbfs //ADMINISTRATOR@DUMMY/Share$ /root/mnt/Dummy command in the script so that I don't get prompted for a password or tell nsmb.conf that the password for Administrator@Dummy is blank.
Thx in advance for any help.