Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Would you use this program and like to see it further developed?
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.
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
Last edited by Murdock1979; 04-08-2006 at 06:33 PM.
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.
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.
I don't think automounting is bad unless it poses some sort of security risk like automounting your boot paritation and leaving it mounted.
Things automatically happening is one reason I got away from Windows. If it's a security risk or not, I don't want something being done completely automatically. I'm all for it going and discovering the shares, then asking. But leaving shares connected that are unused is something I dislike doing. There's a lot of behind-the-scenes stuff when dealing with the Windows/Samba shares, and frankly, simply being hooked up to a Windows machine without my knowledge is something that gives me the chills.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.