#162634 - 2006-05-30 04:43 PM
questions about my login script
|
Tginestet
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
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
|
Top
|
|
|
|
#162636 - 2006-06-01 11:55 AM
Re: questions about my login script
|
Tginestet
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
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
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
2 registered
(morganw, mole)
and 414 anonymous users online.
|
|
|