LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-20-2005, 04:16 PM   #1
Ateo
Member
 
Registered: Sep 2004
Location: Long Beach, CA
Distribution: FreeBSD,Ubuntu,Gentoo,MacOS
Posts: 139

Rep: Reputation: 15
"logon" scripts


I'm looking for a bash or perl script that scans a local subnet for nfs or samba services and mounts available shares. Is something like this available?

Writing a custom script is a possibility but my bash/perl skills are minimal.

Thanks
 
Old 09-20-2005, 04:33 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I'm not aware of anything like that, but it shouldn't be too difficult to implement. The only hard part is knowing what usernames/passwords to supply (and where you want the mounted, if anywhere special).
 
Old 09-20-2005, 04:44 PM   #3
Ateo
Member
 
Registered: Sep 2004
Location: Long Beach, CA
Distribution: FreeBSD,Ubuntu,Gentoo,MacOS
Posts: 139

Original Poster
Rep: Reputation: 15
Actually, when mounting samba, you can supply a username/password directly in the mount command or use a credentials file. I was thinking *that* would be the easy part. I was thinking that querying the subnet for available services might be on the harder side....
 
Old 09-20-2005, 04:51 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Code:
for i in `seq 1 254`
    do smbclient -L 192.168.0.$i
done
That will at least provide you with a human-readable list. But it should give you a general idea of what you're looking for.
 
  


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
what is "/etc/sysconfig/network-scripts/ifcfg-eth0" its counterpart in slackware b0nd Slackware 2 10-06-2005 12:50 AM
What does this mean? suSE9.1 ATI "/bin/sh: line 1: scripts/modpost: No such file or" op_stager Linux - Hardware 0 09-29-2004 11:28 PM
.kde/Autostart bash scripts "file not found" Nice-n-Slow Linux - Software 1 07-02-2004 05:25 PM
Why do scripts like "./install" and "./configure" not work for me? engineerwell Linux - Newbie 2 02-05-2004 07:09 AM
I can't logon with the "user" and "pass"...help! bseven Linux - Newbie 5 11-08-2002 01:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:31 PM.

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