automating mounting of windows SMB shares
Hello!
I am developing a shell script that automatically searches and mounts Samba and Windows SMB shares. You give your username and password and the program searches all available shares and mounts them in specified directory. The program is called SambaLaunch and can be downloaded from http://smblaunch.blogspot.com/ Would you use this program and like to see this program further developed? Thanks, Murdock |
This seems like an interesting idea. A couple of things to think about on the security side though.
It would be much better to use a secured (ie chmod 400) credentials file rather than passing the login details on the command line where they can easily be ready by any other user on the system. It is also worth noting that if someone adds a rouge machine to your network and everyone runs this script then it would be quite easy to log the usernames and passwords of the computers attempting to connect. Using a trusted hosts list would help a little in this regard. On the programming side it would be better to append the local pid to your temporary files incase the proccess is run twice and also check the exit codes of the main applications being run. |
Thank you david ross for all of your input. The points you made are very helpful. The current script is usuable but it is far from tuned-up and polished off and is intended for future iterations. I will try to implement them as time becomes available.
I didn't understand what you meant that it should "also check the exit codes of the main applications being run"? I'll keep you updated, Murdock |
I don't use Samba... not yet anyway, but I think it would be great!
|
Unfortunately, you only had one option for "No" (No, I wouldn't use it, as automounting is bad IMHO), but I think it's a great idea and should be continued to be developed.
I would use it, though, if it had the option to ask me what to mount, that would be a program that I would definitely think about using. |
I don't think automounting is bad unless it poses some sort of security risk like automounting your boot paritation and leaving it mounted.
|
Thank you Arc and Penguin for the feedback.
If you want a lot of control with Samba mounts, it would be best to use LinNeighborhood. The purpose of this program is to mount shares without the all the fuss and details that LinNeighborhood requires, like the location of the mount and where to mount it. Smblaunch finds it main usefulness in medium to large organizations, where one simply does not have the time to give attention to each computer as much as in smaller networks. However, small networks, especially ones being run by newbies, would also find this utility useful. The utility is still in its early versions, and we are in the midst of development. Any mounting and storage device manipulating has its risks, and we are working on closing as much of them as possible. Future versions will probably have a blockhost file which will block specified hosts. The configuration file will also be located in a chmod 400 private file. Thank you again, Murdock |
Quote:
And IMHO, anytime you have something mounted, it's a security risk because there's two-way communication there. As another person said, all it takes is one share with a bad RPC command auto-executing on it, and the consequences could be really, really bad for you. |
All times are GMT -5. The time now is 08:15 PM. |