Page 1 of 1 1
Topic Options
#162634 - 2006-05-30 04:43 PM questions about my login script
Tginestet Offline
Lurker

Registered: 2006-05-30
Posts: 3
Hi list,

I've got few problems with my first login script in Kixtart, hope you can show me the way:

First, i've got nothing when trying to retrieve the value of @homedir and @homeshr. Here is my code:
? "homedir:"@HOMEDIR+" "+"homeshr:"@HOMESHR
It shows only homedir: homeshr:
Are there macros still existing ? I've tried from both WinXP and Win2K

My other problem is that i've got no problem with mapping group drive but for specific user access, mapping doesn't work.

SELECT
CASE INGROUP ("group1")
USE O: /delete
USE O: @LSERVER+"\group1"
IF @ERROR <> 0
? "Error mapping drive group1 !"
ENDIF
ENDSELECT

=> Works well

SELECT
CASE @WUSERID = "linus"
USE R: /delete
USE R: @LSERVER+"\group2"
IF @ERROR <> 0
? "Error mapping drive group2 !"
ENDIF
ENDSELECT

=> Doesn't work


I've got a last (but not least) newbie question: I want to write access logs to the server when an user loggin, but i've got the access denied error code. Is it possible with kixtart to use root privileges in order to create and write the file ?
I heard that Admin Script Editor can do things like that but I don't want to use it.

Any help would be appreciate

Thomas

Top
#162635 - 2006-05-30 06:02 PM Re: questions about my login script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
As a beginner, start with the basics. Understand that Kix only functions within the security parameters that are assigned to the user that runs the script.

If you want to log user access, create a share (hidden if you want) that contains your log, and give the users perms to read & write there


For your drive mapping problem, verify if the user already has a mapping to R: and has a file lock... it will prevent the use /delete from deleting and then the following use statement to fail. Then verify the path is correct. Then verify the user has perms. Then do it manually at user's machine.

Include details of client OS and domain type for help with the @home??? macros
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#162636 - 2006-06-01 11:55 AM Re: questions about my login script
Tginestet Offline
Lurker

Registered: 2006-05-30
Posts: 3
I've already checked but there is no other mapping to R and user has correct perms. I can manually mount the drive too.

I saw an other problem but with the SELECT CASE INGROUP ENDSELECT: if an user belongs to several groups, only the first drive if mapped. Should I use IF ENDIF instead ?

For the @home??? macros, my clients OS are WinXP pro and Win2K. I use a pdc under Linux with Samba for homes shares and others networks shares.

About security parameters...if Kix use user privileges, I don't understand how can it be possible to install or update software without admin privilege ?

Thanks for your help

Top
#162637 - 2006-06-01 01:04 PM Re: questions about my login script
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Heyya.
Code:

? "homedir:"@HOMEDIR+" "+"homeshr:"@HOMESHR
Works fine for me.
? "homedir: " @HOMEDIR " homeshr:" @HOMESHR
Also works fine.
? "homedir: " + @HOMEDIR + " homeshr:" + @HOMESHR
Also works fine.

It looks to me that you don't get any values from the macros - Yes, they still exist and work otherwise. My advice here would be to check your samba-config.

SELECT

CASE @WUSERID = "linus" <- should be @USERID
USE R: /delete
USE R: @LSERVER+"\group2"
IF @ERROR <> 0 ? "Error mapping drive group2 !" ENDIF

ENDSELECT



There's nothing wrong with select case endselect. It catches the first true statement, then continues. What you can do is either use a ini-file and read from that for each mapping (then you don't have to have 999 lines of if-statements), or another idea is using select case with a 'site' group or something, to then in the case, have if-statements. It's your choice =)

For your question regarding security context, there's plenty of programs that can elevate or run under a different context so installs/uninstalls/updates etc. can be done (CPAU, RUNNAS (udf here at korg), psexec etc.etc).

And, at last, your access-logging - to be able to write to a fileshare etc. you need to have write perms, I myself would log it to the users homeshare or something similar.
Hope I helped somewhat.


Edited by Björn (2006-06-01 01:10 PM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#162638 - 2006-06-06 06:22 PM Re: questions about my login script
Tginestet Offline
Lurker

Registered: 2006-05-30
Posts: 3
Yep thanks a lot for your help.

There was a problem with one of my share but now it's ok. I've made a logshare too and no problem anymore. The only mysterious thinks is always the @home??? macros because my samba config seems to be good.

An other question but about win98: I've tried to test running kixtart from win98 client but nothing works (the kixtart doesn't start). My kixtart script is launched by a .bat with the command: \\pdc\netlogon\kix32.exe \\pdc\netlogon\logon.kix

It works for XP and 2K but not for Win98. Should I use something else or specify more stuffs in order to run kixtart from this OS?

Thanks for your comments

Top
#162639 - 2006-06-07 03:31 AM Re: questions about my login script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
for win98 you may need to issue "start"

try to run your script manually on the win9x box.
_________________________
!

download KiXnet

Top
#162640 - 2006-06-07 04:04 AM Re: questions about my login script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The Win9x redirector is so bad that MS temporarily maps the Z: drive to netlogon. You might want to test OS with VER and GOTO a 9x section of your batch where you can use the Z: drive.

Z:\KiX32.exe Z:\logon.kix
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#162641 - 2006-06-07 04:07 AM Re: questions about my login script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Geez.. what am I saying? Don't support Win9x, just FDISK them!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


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

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.06 seconds in which 0.027 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