I am trying to write a script to mount about 10 different network drives using samba. The drives mount just fine, but when I am using the command line, it hangs when I press enter to execute the command. When I ctrl+c to break out and list the mount point, the drive is mounted perfectly. The would seem like a minor annoyance, but when I try to run the script (that I will eventually put in /etc/rc.d/rc.local), it will not finish.
I am running RedHat 9.0. the really odd thing is that it hangs on different mounts every time. One time it will mount fine and not hang, and others it wont, with no real pattern. Here is an example of my mount command. I am trying to use sudo so that I dont need to be root, but it hangs just the same if it is in there or if it is not and I run the script as root. Here is one example, they are all exactly the same except for the computer names and IPs
sudo umount //CHNT8/tdrive
#mounts CHNT8 to /mnt/smb/CHNT8/tdrive
echo "Mounting CHNT8 tdrive...."
sudo mount -t smbfs -o username=<username>,password=<passwd>,uid=markb,gid=pos,ip=<ipaddress> //CHNT8/tdrive /mnt/smb/CHNT8/tdrive/
echo "Done with CHNT8 tdrive."
If anyone sees anything that might be causing this, PLEASE let me know. Any help is much appreciated