LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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


Reply
  Search this Thread
Old 09-23-2008, 11:40 PM   #1
babag
Member
 
Registered: Aug 2003
Posts: 419

Rep: Reputation: 31
timeout accessing xp share from linux scripts?


having an odd issue trying to log in to an xp home share
from mandriva linux 2007.1.

have a bash script in linux that tries to log on to the
xp share with this line:
Code:
sudo smbmount //D200/Capture\ \(E\) $HOME/mnt/d200 -o username=D200,password=xp-password-here,rw
as you can see, the xp password is included in the smbmount
command. i spite of that, though, i am asked for a password.

this only happens the first time i try to log in to the xp
box. after that, the same script running on different boxes
can log in freely to the xp box.

if it was that simple, though, i could just do a smbmount
and then unmount just before i ran the script so things
would be ok. problem is that there seems to be some kind of
timeout in play here.

when i tested the scripts on a small project they worked
fine. on an actual run, though, that takes a long time, the
timeout seems to come into play and i'm again asked for the
password. needless to say, this gums up the running of the
script.

i also noticed this when i was debugging the script. if i
ran a couple of tests back to back, everything was fine. if
i had to take time to rework something in the script, though,
i'd be asked for the password again.

how can i get around this?
is there a timeout setting somewhere in xp?

on the other hand, could this have something to do with the
sudo command that preceeds the smbmount command?

i just installed sudo, specifically for the purpose of
running this script.

could it be sudo that's asking for the password?
how can i check that?

the password is the same for all of the boxes and accounts.
it's a small network i use here at home.

thanks for any insights,
BabaG

Last edited by babag; 09-23-2008 at 11:42 PM.
 
Old 09-24-2008, 02:21 PM   #2
babag
Member
 
Registered: Aug 2003
Posts: 419

Original Poster
Rep: Reputation: 31
new info on this.

just tried a suggestion of trying the logon as root,
without the script running. i was still asked for a
password. i suppose that implies it's an issue on the
xp side? now what?

BabaG
 
Old 09-24-2008, 06:47 PM   #3
babag
Member
 
Registered: Aug 2003
Posts: 419

Original Poster
Rep: Reputation: 31
got the solution. turned out to be confusion in the sudoers
file between the wheel group and the individual user. had
the nopasswd option set for one but needed the other or both.

seems to be working fine now.

BabaG
 
  


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



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

All times are GMT -5. The time now is 12:33 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