LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


View Poll Results: Would you use this program and like to see it further developed?
yes 10 90.91%
no 1 9.09%
Voters: 11. You may not vote on this poll

Reply
  Search this Thread
Old 04-06-2006, 05:35 PM   #1
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429
Blog Entries: 2

Rep: Reputation: 30
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

Last edited by Murdock1979; 04-08-2006 at 06:54 PM.
 
Old 04-07-2006, 12:06 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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.
 
Old 04-08-2006, 12:46 PM   #3
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429

Original Poster
Blog Entries: 2

Rep: Reputation: 30
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.
 
Old 04-17-2006, 12:03 PM   #4
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
I don't use Samba... not yet anyway, but I think it would be great!
 
Old 04-17-2006, 01:42 PM   #5
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
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.
 
Old 04-17-2006, 01:46 PM   #6
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
I don't think automounting is bad unless it poses some sort of security risk like automounting your boot paritation and leaving it mounted.
 
Old 04-17-2006, 03:20 PM   #7
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429

Original Poster
Blog Entries: 2

Rep: Reputation: 30
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
 
Old 04-17-2006, 03:22 PM   #8
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Quote:
Originally Posted by Penguin of Wonder
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting SMB shares as non-root vxd Linux - Software 11 03-10-2006 07:47 PM
mounting smb shares towel401 Linux - Networking 4 10-31-2005 06:59 PM
Mounting smb shares john8675309 Linux - Software 3 09-25-2005 09:54 PM
mounting smb shares Snerkel Linux - Hardware 6 07-29-2004 01:17 AM
Problem mounting SMB shares... Camasii Linux - Networking 2 12-13-2003 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration