[nmglug] Couple of samba questions.

Tim Emerick timothyemerick at yahoo.com
Mon May 31 19:21:38 PDT 2004


I have a couple of questions if anybody can help me with them.\

1. I've been upgrading some 70 pc's at work from win9x to winxp pro.  My
print/file server is redhat/samba.  For some reason I am not able to access
print and file shares that are on WinXP Pro machines from either Samba,
Win9x, or DOS.  All OS's other than WinXP can't seem to get past the password
prompt.  WinXP can see and use my Samba shares though.  Anybody know if there
is a WinXP setup that I am missing that will allow Samba (and other non xp
os's) to access a WinXP share?

2. After converting all these machines I will need to write a short script to
change some info in a text file on each machine.  I'm not exactly sure how to
write this as a bash script or as a DOS batch file so hopefully I'll get some
good ideas here.  Here are the step.

a. Read a list of Win XP Pro machine names from a text file.
b. Search the admin share (c$) for all occurences of a particular file
(session1.wic).
c. replace the text in each found file with another text.  In this case I'll
be looking for an IP address and substituting another IP address.
d. log everything that was done, good or bad, to a log file.

I was thinking of using sed to do the text replacement.  I have a win32 port
of sed that works on WinXP and I know that it exists on my linux box.  Using
linux over dos hinges on getting problem #1 fixed.  Here is a conceptualized
dos batch file that will do what I want.  I've not read up enough on sed to
know if that is the tool I need or how to use it.  That is my next step.

net use x: \\machine1\c$ (supply userid/password.  similar to mounting a smb
share)

dir x:\session1.wic /a /s /b > foundfiles.txt (equivalent of "find / -name
session1.wic" but searching through hidden directories)

use sed to read in foundfiles.txt and replace text in each file with
something else.

TIA for any help or pointers anybody can give me.

Tim Emerick


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 




More information about the nmglug mailing list