Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!mcsun!ukc!sys-uea!cmp8118 From: cmp8118@sys.uea.ac.uk (Dave Cartwright) Newsgroups: comp.sys.novell Subject: Re: other than in the login script... Message-ID: <1052@sys.uea.ac.uk> Date: 9 May 91 11:08:06 GMT References: <3662@borg.cs.unc.edu> <1991May8.153520.86683@vaxc.cc.monash.edu.au> Organization: UEA, Norwich, UK Lines: 49 steved@vaxc.cc.monash.edu.au writes: >In article <3662@borg.cs.unc.edu>, averett@hatteras.cs.unc.edu (Shava Averett) writes: >> Is there any way I can get the user's login directory from novell, other >> than hacking everybody's login script to create an environment variable >> (which I haven't tried but assume will work...) Every other file system >> I have ever worked will puts this into some sort of script accessible >> logical/symbol/variable/whatever-they-care-to-call-it, but I somehow don't >> see it in Novell... I am working in 2.15C but will be working on 3.11 >> real (*cough*) soon now... >> The way I do it is to put the first line in the System Login Script as DOS SET LOGIN=%LOGIN_NAME (or something like that ... I'm 100 miles away from my NetWare system) After this, you can set things like the private drive to something sensible (mine is HAL\SYS:DATA\USER\), and can use the Environment variable LOGIN in other situations. There's only one drawback with this ... you can only have directories of <=8 chars. Now this is OK sometimes, but occasionally you get the thing bombing out because it can't handle a name longer than 8 (SUPERVISOR springs to mind) You can get round this by (maybe) writing yourself a little C prog to take a string and return just the first 8 chars ... but watch out (eg) for two people with common 8-letters (like CARTWRIGHTD and CARTWRIGHTK) - these can cause problems. As it happens, my system (about 90 users) has no such clashes, and we've defined a username as first initial plus the first 7 letters of surname (if there are 7 letters). Examples are D. Cartwright -> DCARTWRI F. Bloggs -> FBLOGGS J. Smith -> JSMITH The only exception we've got is SUPERVISOR, which I have dealt with by putting a little clause in the System Login Script - IF User Name is Supervisor THEN Bugger about with it, otherwise LOGIN=%LOGIN_NAME. Hope that's of interest ... I thought I'd post it cos there may be more than one interested party. Dave C -- Dave Cartwright, | cmp8118@sys.uea.ac.uk or uk.ac.uea.sys School of Information Systems, | uucp : ...!ukc!uea-sys!cmp8118 University of East Anglia, | "Reality is an illusion brought on by Norwich, ENGLAND. NR4 7TJ. | lack of alcohol ..."