Managing Netscape Profiles for Roaming Users

Novell Cool Solutions: Trench
By Ger Brouwer

Digg This - Slashdot This

Posted: 6 Sep 2000

Current version: ZfD 3

Looking to manage Netscape Profiles for your roaming users? Here are some cool ideas. If you have any other thoughts, let us know. And by the way, Ren? Russchen sent the following excellent suggestion about sharing:

"Why don't we share the AXT/AOT files themselves? 100 or more times generating an app for the latest Netscape can be done only once if we could find a way to share these results. It can be done using variables for the user/machine related settings (like directory/server/usernames) etc."

We think that's a great idea. If you zip up your AXT/AOT files and attach them to your suggestions, we'll post them. The best way to send them is to bypass the normal Talk to Us form and send an e-mail directly to zwmag@novell.com.

Original Question

Eugene G. wrote: Is there a "coolsolution" for managing Netscape Profiles for users that roam from one workstation to another? We store Netscape User profiles on the server but when a user logs in on a station that hasn't been setup with location of the Netscape profile, needless to say, it doesn't work as it should. Thanks!.

Ger Brouwer's Solution

Yes, there is. I did it this way.

  • OS Windows NT 4.0 Workstation
  • ZEN 1.1
  • Novell Client 4.7
  • I work with roaming profiles (about 800 students).

Here's what you do:

  1. Run snAppShot.
  2. Scan disk C (or D, depending on where you put your NT installation).
  3. Also scan disk H (this is my home directory on the server).
  4. Install Netscape Communicator 4.x and reboot.
  5. Start Netscape 4.x.
  6. On the second screen, don't enter a full name and e-mail address. Click Next.
    Now the important part...
  7. Leave profile name at "default."
  8. In the directory field, fill in the home directory of the user. (I used H:\Netscape. This is the default home directory for all my users, plus the Windows profile directory. The directory could be any directory as long as it is on a Novell file server.)
  9. The next screens are e-mail and news settings, they speak for themselves. That's it for Netscape.
  10. Finish snAppShot, and create an application called Netscape.
    1. Only use the parts that are installed on the server in directory H:\Netscape.
    2. Delete the rest except for file nsreg.dat. This file installs in C:\winnt.
    3. Create a separate app for this file and mark it Distribute Always at User Login.
    4. Then delete the file out of the Netscape app.
      This file holds the information where Netscape saves his user profile.

    I distribute this file every time a user logs in, then I am sure that the profile directory always points to the right direction.

    In a secure NT WKS (C:\WINNT - read only) give this file change permissions.

    This is necessary because every user who logs in on the workstation leaves an entry in this file. It grows with a lot of users, that's why I always start with a fresh file at user login.

  11. Select force run, run once.

When a user logs in for the first time the Netscape app distributes once and creates the Netscape entries in the user home directory, and fills in his e-mail address, username, etc. Thus, one click, and up and running.

So you can login on any NT workstation in my network and use Netscape without any problems, even with roaming profiles.

I hope this solves some people's problems of using Netscape with roaming profiles.

If you have any questions you may contact Ger at G.M.J.Brouwer@TNW.TUDelft.nl

Chris Brown NEW

Eugene G. had a question about roaming profiles under Netscape. I support a school system where just about every user moves from station to station, so this has been a big issue for me.

Under Netscape 4.05 forcing the location of profiles under Netscape was relatively simple: Netscape looked in the Registry under "HKEY_LOCAL_MACHINE\SOFTWARE\ Netscape\Netscape Navigator\Users" for profile information. You could dynamically point Netscape to look for the user files anywhere you wanted by following these steps:

  1. Set ".\CurrentUser=profilename"
  2. Make sure there are no other profile definitions under this branch of the Registry except "profilename."
  3. Set ".\profilename\DirRoot= [Location of user's Netscape files]"
  4. Have NAL make sure there is at least a default set of user files located at that location.

    Note: [Location of user's Netscape files] can be anywhere, but I usually use a subdirectory of the users home directory, like "H:\Netscape.4"

There are a few tricks you can pull with this setup. I have some instances where I don't want the Netscape profile/bookmarks to be persistent (like on a shared workstation used by generic accounts, not personal accounts) so I store the profile info on the hard drive, but have NAL re-copy all the profile files every time it is run. Also, by adding one more directory layer to the [Location of user's Netscape files], you can allow users to have multiple instances of Netscape profiles that can follow them. This has been useful to allow teachers to run Netscape as a "student" with the default set of bookmarks which is updated regularly, or as a "teacher" where they can maintain their own set of bookmarks and also use the e-mail features of Netscape.

With newer versions of Netscape (starting with 4.5), Netscape started storing the profile information in its own proprietary registry-type file, and no longer looks to the Windows Registry for this information. BUT there is a trick to make it do so. When you upgrade from Netscape 4.05 to 4.5 or above, Netscape imports the information from the Registry and marks it with a flag called "Obsoleted", thereby marking it as imported and to-be-ignored in the future. But if that flag does not exist, Netscape re-imports the Registry info every time. So the trick is to have NAL delete the "Obsoleted" Registry entry every time Netscape runs. This trick works with Netscape 4.7, I have not experimented with Netscape 6 yet.

The relevant Registry entries are:

  • HKEY_LOCAL_MACHINE\SOFTWARE\ Netscape\Netscape Navigator\ Users\CurrentUser="profile"
  • HKEY_LOCAL_MACHINE\SOFTWARE\ Netscape\Netscape Navigator\ Users\profile\
  • HKEY_LOCAL_MACHINE\SOFTWARE\ Netscape\Netscape Navigator\ Users\profile\DirRoot="%PREF_DES%\\%USER%"
  • Delete -> HKEY_LOCAL_MACHINE\SOFTWARE\ Netscape\Netscape Navigator\ Users\profile\Obsoleted

The user profile files that need to be at "%PREF_DES%\\%USER%" are:

  • %PREF_SRC%\%USER%\bookmark.htm
  • %PREF_SRC%\%USER%\cert7.db
  • %PREF_SRC%\%USER%\cookies.txt
  • %PREF_SRC%\%USER%\key3.db
  • %PREF_SRC%\%USER%\liprefs.js
  • %PREF_SRC%\%USER%\prefs.js
  • %PREF_SRC%\%USER%\secmod.db
  • %PREF_SRC%\%USER%\signed0.db
  • %PREF_SRC%\%USER%\summary2.dat

You can make these "Distribute Always" or "Create if does not exist" depending on your situation.

And as you see I use Macros to keep everything simple.

  • %PREF_SRC% -> The source directory where all the default user profile files are stored.
  • %PREF_DES% -> The destination directory for profile files (H:\Netscape.4 in my case).
  • %USER% -> The instance, or particular directory, where the profile files are stored. This is NOT tied to the username, but generally refers to the instance of Netscape (teacher/student/libraryuser) that the particular NAL object is to execute.

If you have any questions you may contact Chris at chrisbrown@arlington.k12.va.us

Matthew Kilbride NEW

I'm doing roaming Netscape profiles by using different %windir%\nsreg.dat files that, based on the existence of a flag on the Home Directory, either point Netscape to the network or to C:=ns_profile for the profile. It's a major undertaking getting it to work smoothly under various conditions. If one was sure that there would always be a Home Directory, then all that would need to be done would be to generate an nsreg.dat file that contains a single profile that points to say H:\Netscape, and copy that file to the local machine at logon. Also, you would want to copy a profile (probably one without all the default crap) to the H:\Netscape directory.

To create the nsreg.dat file, just rename the nsreg.dat file to nsreg.old, and then run Netscape. This will bring up the profile creation process, and then you can configure at will. Copy the file to the network.


nsreg.dat is a proprietary Netscape registry file that may contain other information. I have tested this, and have had it in production under a 700 user environment for about 3 weeks without seeing any side-effects. Plug-ins & other stuff don't seem to be affected by the replacement of this file. There is no way that I know of to modify this file. Replacement of this file might be unhealthy to something, but if it is, I haven't found it.

The process is pretty complicated, but here it is for anyone who is interested.

If you have any questions you may contact Matthew at kilbride@principia.edu

Remco Rohde

Maybe this is just old news, but I'd like to share it anyway. Here's a way to distribute settings to Netscape using a generic "prefs.js" file and the Textfile search and replace functions in ZEN.

We have a setup where we use Netscape roaming profiles which are stored in the user's home directory.

We use "G:\Mozilla", but any user-writeable network directory will be sufficient.

  1. First setup your Netscape app like suggested here.
  2. Then copy the prefs.js file to shared directory, or better the snapshot's %SOURCE_PATH%.
  3. Edit the copied prefs.js file in a text editor (and ignore the line "// This is a generated file! Do not edit" :-).
  4. By example, edit the line to where the cache directory points, which we DON'T want on the user's homedir.

    user pref("browser.cache.directory", "REPLACE_THIS");
  5. And another one, to change the default startup page.

    user_pref("browser.startup.homepage", "REPLACE_THIS");
  6. The common news server's hostname.

    user_pref("network.hosts.nntp_server", "REPLACE_THIS");
  7. The SMTP server.

    user_pref("network.hosts.smtp_server", "REPLACE_THIS");
  8. The pop3 server you want them you use.

    user_pref("network.hosts.pop_server", "REPLACE_THIS");
  9. The pop3 server's username.

    user_pref("mail.pop_name", "REPLACE_THIS");
  10. Or the user's e-mail address.

    user_pref("mail.identity.useremail", "REPLACE_THIS"); etc.
  11. Save and exit.
  12. Now the fun part:In Nwadmin, application files : copy the generic prefs file, "%SOURCE_PATH%${BS}prefs.js" to "G:${BS}Mozilla${BS}prefs.js".
  13. Then in the app page "Text Files" tab, add file: "G:\Mozilla\prefs.js"
  14. Let's define the pop3 server's hostname here.
    • Add a change;
    • modification : "search and replace text in the file"
    • search for : "a line in the file"
    • find what : "user_pref("network.hosts.pop_server", "REPLACE_THIS");"
    • replace with : "user_pref("network.hosts.pop_server", "pop3.domain.com");"
  15. Or the browser's cache dir;
    • search for : "user_pref("browser.cache.directory", "REPLACE_THIS");
    • replace with : user_pref("browser.cache.directory", "D:\\CACHE");

    (Don't forget to create the Cache dir first with application files, and watch the double slashes : \\ !)

    • Even a better thing is, you can use common netware variable's here:
    • To enter an e-mail address, we have the first part of the user's e-mail address in the field "Full Name", e.g. "R.Rohde" :
    • find what : "user_pref("mail.identity.useremail", "REPLACE_THIS");"
    • replace with : "user_pref("mail.identity.useremail", "%FULL_NAME%@domain.com");");"

You could use this technique for a lot of settings in the prefs.js file, and if you do a "distribute always", you can prevent users from changing stuff you don't want them to.

(Hmm, startup page, anyone?)

Or if you set up a new pop3 server and you want to change it in one go for all users, just change the "replace with" field with the host name of the new server!

I hope this can be of any use. It's how we do it at the Computing entre, University of Groningen, The Netherlands.

If you have any questions you may contact Remco at r.rohde@rc.rug.nl

Corey Webb NEW

This is in response to the "Ask The Experts" (5/17/00) question in which Eugene G. asked about roaming profiles in Netscape Navigator (or Communicator). I implemented this on my site over a year ago, and it works quite nicely.

Netscape stores the "bare necessities" of its user profile information as keys in the registry under HKLM/Software/Netscape/ Netscape Navigator/Users. (I still don't understand why they didn't HKCU for this, but that's another matter.) The directory location for each user is stored as a string value, "DirRoot", under that key. What I've done in my distribution is simply create one user profile there, called "Default". Each user's Netscape profile is stored in their home directory (mapped as H:), in the NETSCAPE subdirectory. So it's just a matter of dropping a string value, DirRoot=H:\NETSCAPE, under the "Default" key.

Note that the same concept would work if you actually used names, instead of "Default", but I think only having one profile on a machine makes it easier to manage.

On a related note, keep in mind that you can specify which profile Netscape should use by putting -P"profilename" on the command line. In my case, the app object has -P"Default", just in case there's another profile there for some reason. This way, the user never sees the "Choose Profile" box.

As an aside, this same registry key also stores the e-mail address and user name. So it's equally simple to drop in "EmailAddr = %CN%@mydomain.com" and "UserName = %Given Name% %Surname%". Just make sure that you mark these two as "Distribute Always".

Sorry that rambled a bit, but I hope it helps someone.

If you have any questions you may contact Corey at cwebb@senniger.com

New Questions

If you have any ideas for David, fire away.

David P. wrote: I have been asked by my supervisor to provide internet access to all the Windows 9x/NT in our network. I already have a NAL app that delivers Netscape to all the desktops but this only works for those users that already have TCP/IP installed on their machines. Is there a way to create a NAL app that will install TCP/IP (DHCP) on every desktop in our network?

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© Micro Focus