[OpenAFS] Roaming Profiles on AFS

Rolandas Naujikas rolnas@takas.lt
Sun, 9 Jan 2005 20:29:08 +0200


Hello,

We are using global path names like \\afs\cell\... to profiles without
problems. At logoff OpenAFS client detects from ADS or NT domain or from
local user info where is profile, and if it is in AFS, doesn't delete
AFS token. I'm myself wrote code for some cases, tested, and it really
detects in 99% cases (exept in case of ActiveDirectory). I'm also have
problems when I used profile paths like N:\cell\...

Rolandas Naujikas

P.S. After all we don't use roaming profiles for students, only
mandatory with folder redirections to do not have to much problems with
quotas.

On Sun, Jan 09, 2005 at 01:59:25AM +0200, Christos Triantafyllidis wrote:
> This is a cryptographically signed message in MIME format.
> 
> --------------ms020008090608070506000109
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> 
> I had already enabled the user profile diagnosis
> Here is the part of logoff of it (i hope that doesn't flood the list):
> 
> USERENV(43c.b2c) 14:13:16:889 LibMain: Process Name: 
> C:\WINDOWS\system32\userinit.exe
> USERENV(170.174) 14:13:22:578 UnloadUserProfile: Entering, hProfile = 
> <0x788>
> USERENV(170.174) 14:13:22:578 UnloadUserProfile: In console winlogon process
> USERENV(170.174) 14:13:22:578 UnloadUserProfileP: Entering, hProfile = 
> <0x788>
> USERENV(170.174) 14:13:22:578 GetExclusionListFromRegistry: Policy list 
> is empty, returning user list = <Local Settings;Temporary Internet 
> Files;History;Temp>
> USERENV(170.174) 14:13:22:578 CSyncManager::EnterLock 
> <S-1-5-21-1004336348-1547161642-1417001333-4532>
> USERENV(170.174) 14:13:22:588 CSyncManager::EnterLock: No existing entry 
> found
> USERENV(170.174) 14:13:22:588 CSyncManager::EnterLock: New entry created
> USERENV(170.174) 14:13:22:588 CHashTable::HashAdd: 
> S-1-5-21-1004336348-1547161642-1417001333-4532 added in bucket 14
> USERENV(170.174) 14:13:22:588 UnloadUserProfileP: Wait succeeded.  In 
> critical section.
> USERENV(170.174) 14:13:23:349 MyRegUnLoadKey:  Failed to unmount hive 
> 00000005
> USERENV(170.174) 14:13:23:349 MyRegUnLoadKey: Returning 0.
> USERENV(170.174) 14:13:23:359 DumpOpenRegistryHandle: 5 user registry 
> Handles leaked from 
> \Registry\User\S-1-5-21-1004336348-1547161642-1417001333-4532
> USERENV(170.174) 14:13:23:359 UnloadUserProfileP: Didn't unload user 
> profile <err = 5>
> USERENV(170.174) 14:13:23:359 MyRegUnLoadKey: Returning 1.
> USERENV(170.174) 14:13:23:359 UnLoadClassHive: Successfully unmounted 
> S-1-5-21-1004336348-1547161642-1417001333-4532_Classes
> USERENV(170.174) 14:13:23:359 UnloadUserProfileP:  Successfully unloaded 
> user classes
> USERENV(170.174) 14:13:23:359 HandleRegKeyLeak: RtlAdjustPrivilege 
> succeeded!
> USERENV(170.174) 14:13:24:531 HandleRegKeyLeak: RegSaveKey succeeded!
> USERENV(170.174) 14:13:24:531 HandleRegKeyLeak: RtlAdjustPrivilege 
> succeeded!
> USERENV(170.174) 14:13:24:531 HandleRegKeyLeak: hkCurrentUser closed
> USERENV(170.174) 14:13:24:541 Entering CUserProfile::WatchHiveRefCount: 
> S-1-5-21-1004336348-1547161642-1417001333-4532, 1
> USERENV(170.174) 14:13:24:541 CUserProfile::WatchHiveRefCount: In 
> critical section
> USERENV(170.174) 14:13:24:541 CUserProfile::WatchHiveRefCount: 
> NtUnloadKeyEx succeeded for 
> \Registry\User\S-1-5-21-1004336348-1547161642-1417001333-4532
> USERENV(170.174) 14:13:24:541 Entering CUserProfile::AddWorkItem: 
> S-1-5-21-1004336348-1547161642-1417001333-4532
> USERENV(170.174) 14:13:24:541 CHashTable::HashAdd: 
> S-1-5-21-1004336348-1547161642-1417001333-4532 added in bucket 14
> USERENV(170.174) 14:13:24:541 CUserProfile::AddWorkItem: No thread 
> available, create a new one.
> USERENV(170.174) 14:13:24:541 CUserProfile::AddWorkItem: Signal event 
> item inserted
> USERENV(170.174) 14:13:24:541 CUserProfile::AddWorkItem: New thread created
> USERENV(170.4cc) 14:13:24:541 Entering CUserProfile::WorkerThreadMain
> USERENV(170.174) 14:13:24:541 CUserProfile::AddWorkItem: Work Item inserted
> USERENV(170.174) 14:13:24:541 CUserProfile::AddWorkItem: thread woken up
> USERENV(170.174) 14:13:24:541 Exiting CUserProfile::AddWorkItem with 
> 00000000
> USERENV(170.174) 14:13:24:541 HandleRegKeyLeak: Calling 
> WatchHiveRefCount (S-1-5-21-1004336348-1547161642-1417001333-4532) succeeded
> USERENV(170.4cc) 14:13:24:541 CUserProfile::WorkerThreadMain: In 
> critical section
> USERENV(170.4cc) 14:13:24:551 CUserProfile::WorkerThreadMain: Leave 
> critical section
> USERENV(170.174) 14:13:24:551 UnloadUserProfileP: Impersonated user
> USERENV(170.4cc) 14:13:24:551 CUserProfile::WorkerThreadMain: Back to 
> waiting...
> USERENV(170.174) 14:13:24:551 UnloadUserProfileP:  Copying profile back 
> to N:\cell\path\to\profile
> USERENV(170.174) 14:13:24:631 UnloadUserProfileP: Roaming profile 
> directory does not exist.
> USERENV(170.174) 14:13:24:641 CreateSecureDirectory: Entering with 
> <N:\cell\path\to\profile>
> USERENV(170.174) 14:13:24:641 CreateNestedDirectory:  CreateDirectory 
> failed with 5.
> USERENV(170.174) 14:13:24:641 CreateSecureDirectory: Failed to created 
> the directory <N:\cell\path\to\profile>
> USERENV(170.174) 14:13:24:641 UnloadUserProfileP: CreateSecureDirectory 
> failed to create roaming profile directory.
> USERENV(170.174) 14:13:24:651 UnloadUserProfileP:  CopyProfileDirectory 
> returned FALSE for primary profile.  Error = 5
> USERENV(170.174) 14:13:24:651 ReportError: Impersonating user.
> USERENV(170.174) 14:13:24:661 ReportError: Logging Error <Windows cannot 
> update your roaming profile. Possible causes of this error include 
> network problems or insufficient security rights. If this problem 
> persists, contact your network administrator.
> 
> 
> DETAIL - Access is denied.
>  >
> 
> USERENV(170.174) 14:13:24:661 ErrorDialogEx: Calling DialogBoxParam
> USERENV(170.174) 14:13:24:671 ErrorDlgProc:: DialogBoxParam
> USERENV(170.174) 14:13:27:115 UnloadUserProfileP: Writing local ini file
> USERENV(170.174) 14:13:27:115 UnloadUserProfileP: Reverting to Self
> USERENV(170.174) 14:13:27:115 UnloadUserProfileP: exitting without 
> cleaning up due to hive unloading failure
> USERENV(170.174) 14:13:27:115 CSyncManager::LeaveLock 
> <S-1-5-21-1004336348-1547161642-1417001333-4532>
> USERENV(170.174) 14:13:27:115 CSyncManager::LeaveLock: Lock released
> USERENV(170.174) 14:13:27:115 CHashTable::HashDelete: 
> S-1-5-21-1004336348-1547161642-1417001333-4532 deleted
> USERENV(170.174) 14:13:27:115 CSyncManager::LeaveLock: Lock deleted
> USERENV(170.174) 14:13:27:115 UnloadUserProfileP: Leave critical section.
> USERENV(170.174) 14:13:27:115 UnloadUserProfileP: Leaving with a return 
> value of 0
> USERENV(170.174) 14:13:27:115 UnloadUserProfile: UnloadUserProfileP 
> failed with 0
> USERENV(170.174) 14:13:27:115 UnloadUserProfile: returning 0
> 
> 
> For this i had:
> 1) n: mounted to \\afs\all (n: is created at machine startup)
> 2) my profile path = n:\cell\path\to\profile
> 3) i also redirected all folders available in group policy to a share on 
> windows server (just in case it was a file in these folder that was 
> using unicode name)
> 
> Is there any way to make windows use 8-bit character set names?
> should i do this?
> can i somehow check if my profile folder has such names?
> 
> 
> Christos Triantafyllidis,
> Aristotles University of Thessaloniki, Greece
> Department Of Physics
> 
> PS: i deleted roaming profile directory on afs. it was recreated at 
> logon. and it wasn't found at logoff (as i can see in log) i think that 
> proves that there was no tokens at logoff (because the folder was (and 
> it is still) there)
> 
> Rodney M Dyer wrote:
> > Christos,
> > 
> > For further diagnosis of your profile problem it may be necessary to 
> > find out why Windows is having trouble writing your profile to AFS.  We 
> > are assuming your token is disappearing, but as Jeffrey Altman suggests 
> > it may be something wrong with a filename.
> > 
> > To enable user profile diagnosis on Windows the following articles are 
> > instructive...
> > 
> > http://support.microsoft.com/kb/221833
> > 
> > http://www.jsiinc.com/SUBE/tip2100/rh2185.htm
> > 
> > Or further, search Google for:  "\debug\usermode\userenv.log"
> > 
> > Rodney
> > 
> > Rodney M. Dyer
> > Windows Systems Programmer
> > Mosaic Computing Group
> > William States Lee College of Engineering
> > University of North Carolina at Charlotte
> > Email: rmdyer@uncc.edu
> > Web: http://www.coe.uncc.edu/~rmdyer
> > Phone: (704)687-3518
> > Help Desk Line: (704)687-3150
> > FAX: (704)687-2352
> > Office:  267 Smith Building
> 
> --------------ms020008090608070506000109
> Content-Type: application/x-pkcs7-signature; name="smime.p7s"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="smime.p7s"
> Content-Description: S/MIME Cryptographic Signature
> 
> MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII2jCC
> BGkwggNRoAMCAQICAXkwDQYJKoZIhvcNAQEFBQAwOjELMAkGA1UEBhMCR1IxEzARBgNVBAoT
> CkhlbGxhc0dyaWQxFjAUBgNVBAMTDUhlbGxhc0dyaWQgQ0EwHhcNMDQxMjE0MTY1MTQ5WhcN
> MDUxMjE0MTY1MTQ5WjBgMQswCQYDVQQGEwJHUjETMBEGA1UEChMKSGVsbGFzR3JpZDEYMBYG
> A1UECxMPcGh5c2ljcy5hdXRoLmdyMSIwIAYDVQQDExlUcmlhbnRpYWZpbGxpZGlzIENocmlz
> dG9zMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDxroacvgqMWnnCvlPswU5pcgjFKAX
> p3JURCiaVTM/vTV2w+Cdcn/UYIG3laQmOJ36i3zTdTqh8sIY+WFUb9aHtO4mMhJX6h+lBhFQ
> ZQdg0WwM/gxd2wmJpw/oE7PzqdOK8Ft/MNet05y8yviBDnJ4BWTVDcMGXuVKhu8Z8DMhLQID
> AQABo4IB1jCCAdIwDAYDVR0TAQH/BAIwADARBglghkgBhvhCAQEEBAMCBaAwDgYDVR0PAQH/
> BAQDAgTwMB0GA1UdDgQWBBRDHhIEDJD1vlcAsxawfR8SWItBMTBiBgNVHSMEWzBZgBQ2JrZf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