Page 1 of 1 1
Topic Options
#67645 - 2002-07-01 11:22 AM Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
Hi all,

we have a very simple script with kix4.02 running on our domain with W95,98,NT4 and W2k clients. All is good so far, maybe not perfect (for others) but it's working...

One problem we have now is to map to a Samba Share on a Unix machine, using the usual command for mapping a drive:

SHELL "%COMSPEC% /C net use T: /DELETE /YES >> c:\login.log"
SLEEP 1
SHELL "%COMSPEC% /C net use T: \\SERVER\SHARE >> c:\login.log"
SLEEP 1

In a DOS-Box all is working fine, drive is mapped, or it's not mapped with a non permission error (groups don't exist on our NT4 PDC/BDC). So all is fine so far.

When running this map from the server side login script, the script simply hangs, the window stays open, nothing else (errors are hidden from users).

This is because the map to samba when executed from the server side asks for a password which he won't ask when executed from the DOS-Box.

Guess there is a difference in some kind here between the DOS-Box when already logged on and the server side script when not completely logged on.

Anyone experienced a similar problem maybe and is able to give me some help?

Thank you kindly,

Pete

Top
#67646 - 2002-07-01 11:25 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
By the way it doesn't matter which and how often i put in a password (yes, the correct one), it won't take it, password question pops up again and again.

Like mentioned, when logged on and mapped then in a DOS-Box or in Windows Explorer, all is fine...

Thx,

Pete

Top
#67647 - 2002-07-01 03:27 PM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
I don't really know that much about connecting to a Samba share, but I would suggest that you change your script to make it readable when it runs (at least for troubleshooting purposes).

I assume you're shelling out to DOS doing a NET USE instead of KiXtart USE because you want the log file? It seems strange to me that you would not have full permissions to the samba share prior to running the logon script. Also, whether or not the script runs from the server shouldn't make much difference (except for speed) because it is still running on the client PC in the account of the user logging on.

I would suggest first making the script visible to test, then adding error checking (@error and @serror) after each line that causes the script to hang. Then we can see a little better what is going on.

Brian

Top
#67648 - 2002-07-01 04:06 PM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
Like mentioned, there is no 'error' to say so, it just asks for a password when started serverside automatically from the server as logonscript, but not when i connect to the share in a DOS-Box or the Windows Explorer. 'Hanging' was maybe a bad description for my problem, it must have something to do with the password transaction, but i have no idea what it could be.

Thx for your help,

Pete

P.s: We went out with the shell command because the Kixstart USE command has not worked for us, at least not with all systems ;-)

Top
#67649 - 2002-07-01 04:18 PM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
pmg, why you use the password method?
if you use server-level security windows network it's work for nothing.

so if you have ntdomain, enable winbind and errors are no longer.

if you do not have. sorry.

anyway, if you use the net use instead of use, it's kix's childprocess which credentials end when the process ends. uttleast, when thought quickly... not 100% sure.

cheers,
_________________________
!

download KiXnet

Top
#67650 - 2002-07-01 04:22 PM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, after reading a little longer while your posts, could you post your samba.conf (without real domain names, usernames and such ofcourse...)

samba version and the platform could also point to right direction.

cheers,
_________________________
!

download KiXnet

Top
#67651 - 2002-07-02 11:41 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
# Samba config file created using SWAT
# from XXX
# Date: 2002/06/26 09:51:35

# Global parameters
[global]
workgroup = 'Our Domain Name'
netbios name = 'Our Netbios Name of the server'
server string = Samba 2.0.7
security = DOMAIN
encrypt passwords = Yes
password server = 'Our NT4 PDC', 'Our NT4 BDC'
unix password sync = Yes
log file = /var/opt/samba/log/log%
name resolve order = host wins lmhosts bcast
wins proxy = Yes
wins server = 'IP-Adress of our WINS-Server'
guest account = guest

[whatever]
comment = whatever
path = /home/whatever
valid users = 'some groups'
admin users = xxx
writeable = Yes
create mask = 0777
directory mask = 0777

[homes]
comment = Unix Homerverzeichnisse
path = %H
read list = %u
write list = %u
force user = %u
force group = main group1
writeable = Yes
create mask = 0770
hide files = /.*/
browseable = No

[dir1]
comment = Test-Verzeichnis dir1
path = /home/dir1
force group = group1
writeable = Yes
create mask = 0770
hide files = /.*/
browseable = No

[dir2]
comment = Test-Verzeichnis dir2
path = /home/dir2
force group = group2
writeable = Yes
create mask = 0770
hide files = /.*/
browseable = No

[dir3]
comment = Testverzeichnis dir3
path = /home/dir3
force group = group3
writeable = Yes
create mask = 0770
hide files = /.*/
browseable = No

Top
#67652 - 2002-07-02 01:24 PM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
have you winbind running or have you manually typed the group information to the server?

then,
this does not get you rid of the errors, but you have homes share in basic.
with samba you can do even like:

[%U]
comment = Home Directory for %U
path = /home/%U
public = no
user = %U

to make automatically shares for all of your users in the style as in NT.

back to your problem.
you have
guest account = guest
on, which gives you the password prompt and you don't need that.

even if you decide, you don't want to use winbind, you may use samba.conf to map all your users!
it can be done with:
add user script

cheers,
_________________________
!

download KiXnet

Top
#67653 - 2002-07-03 08:36 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
Thx for all your hints, we removed the 'guest' line, but it still asks for a password :-(

Well, no idea what it could be. I wasn't able to find anything that points to a difference between the DOS-Box and the Loginscript at M$.com but i am still in hope...

Thx again for the help...

Pete

Top
#67654 - 2002-07-03 09:01 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
PMG,
still want to make this work.
could you take of
unix password sync = Yes

and see what is the thing then?
also you might want to check with testparm the settings.

the ones I come up with are:
hosts allow
smb passwd file

and then
you have:
read list = %u
write list = %u
force user = %u

I noticed when used samba like you before implemented winbind, that the user is not %u but %U
this is actually one I would check first.

also, you have set the password servers but is there any specific reason why you don't use *?
when used as a member server in domain, it automatically gets the fastest responding DC and queries from it.

cheers,
_________________________
!

download KiXnet

Top
#67655 - 2002-07-03 09:05 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
ok, trying a few... and thx again ;-)
Top
#67656 - 2002-07-04 10:32 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
PMG Offline
Fresh Scripter

Registered: 2002-07-01
Posts: 7
Loc: Germany
Did not work.. Will create groups now and will explicit map through the groups. Thought i can get around with this because of group replication issues, but...

but again many thx for your kind help,

greetings,

Pete

Top
#67657 - 2002-07-04 10:41 AM Re: Urgent Problem, Unix Mapping, Script hangs... TIA
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mmm...
sad I couldn't help but well enough is that you have go around.

cheers,
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.069 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org