Automatic login

This forum is to find answers to problems you may be having with ZEVO Community Edition.

Moderators: jhartley, MSR734, nola

Automatic login

Post by jollyjinx » Sun Feb 24, 2013 10:33 am

I'm having issues when I setup users with ZFS home directories and let them automatic login.

Is there a workaround to delay the automatic login process until ZFS is completely running ?
jollyjinx Offline


 
Posts: 60
Joined: Sun Sep 16, 2012 12:40 pm
Location: Munich - Germany

Re: Automatic login

Post by grahamperrin » Wed Feb 27, 2013 10:05 pm

In Ask Different: How can I delay loading of a launchd Launch Daemon on boot? Whilst the question relates to MacPorts, an answer might help with thinking around com.apple.loginwindow

Can you describe one of the issues?

Thanks
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Automatic login

Post by shuman » Thu Feb 28, 2013 12:21 pm

I think I can explain the issue as I have the same problem. If you attempt to log in before the user's filesystem is mounted, OS X will simply create a new user directory. You are then logging into a brand new account with none of your user settings or files.

Steps to resolve:
1. Log out of "zfs account" and log into an account on hfs.
2. Delete all the folders created by OS X where zfs filesystems should exist.
3. Mount any zfs filesystems that were unable to mount.
4. Log out of hfs user
5. Log back in as zfs user.

There needs to be a way to warn the user that the filesystem is not mounted or delay the login screen.

Jolly, is this more of less the issue you are having?
- Mac Mini (Late 2012), 10.8.5, 16GB memory, pool - 2 Mirrored 3TB USB 3.0 External Drives
shuman Offline

User avatar
 
Posts: 96
Joined: Mon Sep 17, 2012 8:15 am

Re: Automatic login

Post by grahamperrin » Fri Mar 01, 2013 4:14 pm

No problem here.

shuman wrote:… warn the user that the filesystem is not mounted …


For me, the operating system (Mountain Lion) never allows log in before the file system for my home directory is mounted. There's no explicit warning, simply an error –

> You are unable to log in to the user account "gjp22" at this time.
> Logging in to the account failed because an error occurred.

2013-03-02 08-49-57 IMG_0433.JPG
photograph of log in error
2013-03-02 08-49-57 IMG_0433.JPG (71.17 KiB) Viewed 119 times


My NFSHomeDirectory is
/Volumes/gjp22

and:

Code: Select all
sh-3.2$ zfs get mountpoint gjp22
NAME   PROPERTY    VALUE           SOURCE
gjp22  mountpoint  /Volumes/gjp22  default
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Automatic login

Post by raattgift » Sun Mar 03, 2013 1:19 pm

What's the value of

$ sudo defaults read /Library/Preferences/SystemConfiguration/autodiskmount

on the system in question?

Does

$ sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

(plus logout, restart) solve your problem ?
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Re: Automatic login

Post by mk01 » Sun Mar 03, 2013 9:27 pm

it happens sometimes to me as well (after crash, mounting fs with much snapshots takes some time and is possible to be quicker even with standard password protected accounts).

I usually use >console to check before I actually log in. but was doing as @raattgift.

Anyhow, this brings me to a different topic, I have more problems with Macosx unmounting the user home dir during logout. I have two mac mini's in my house which are used by family members. User homes are located there (on ZFS), synced via HomeSync to notebooks if needed, or used as a home dir for logins from other devices without home dir copy. Within the logout process mac is unmounting the home dir for accounts which are Network accounts and are not converted to Mobile accounts at the first login. Because in this situation mac is considering network login to a remote home dir it tries to mount on login (is not needed, because is local on the server) and then unmounts during logout.

This is causing pain in the ass, the zfs filesystems are always busy (always some logins through ssh, or remote desktops) but still due some /bug?/ ZFS ends up ready to restart - best case fs remains unmounted which is making next user unable to login (due to error with inaccessible home folder).

I can't imagine what happens during login sessions ending, but zfs most of the time unmounts the root fs (according to mount), leaving proxys intact (diskutil list). but with no names for them (accorging to mount), only the indexes as the proxys listed with diskutil list. so ZFS is unmouned without the children being unmounted first sf's, unable to remount the higher levels with mount or zfs mount putting some king of IO error 10 on screen and logs.

very very unpleasant. Is there any trick with system defaults as well?

br,
Matus


mk
mk01 Offline


 
Posts: 65
Joined: Mon Sep 17, 2012 1:16 am

Re: Automatic login

Post by raattgift » Mon Mar 04, 2013 5:16 am

Dynamic/automatic mounting, device naming, and launchd are peculiar to modern Mac OS X and are also *fundamental* to it. If these are in the way of your system configuration and administration then I think, to be honest, that you would be better off using illumos (or FreeBSD) as a file server (exporting ZFS datasets and/or zvols via SMB, NFS and/or iSCSI to your Mac clients), rather than spending so much effort trying to fight these sorts of issues with Mac OS X.

If you are wedded to Mac OS X for file service and you're running 10.8.2 + Mountain Lion Server (+ the liberate patch) and are having these dynamic mount issues, then something odd is going on with your configuration or what you're trying to do. Possible approaches to a workaround for some of the troubles you've described might include taking advantage of launchd.plist(5)'s PathState, OtherJobEnabled, and LimitLoadToSessionType keys; the mountpoint=legacy zfs dataset property; or both.
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Re: Automatic login

Post by mk01 » Mon Mar 04, 2013 5:59 am

I would not call odd documentation and defaults provided by Apple - as Directory Services, Network Accounts, Home Sharing and FileSyncAgent. There is nowhere written in the docs, that one is asked not to log into server console directly where his network account data are stored and where makes no sense to create local Mobile Account, right ?

Apple publicly took out all standards related to NFS (account homes for example). Although the functionality is still there - the new concept has few glitches (since 10.8). Like the one I described. If you configure it the new way (AFS homes), you loose fast user switching - because the nature of mounting AFP (exclusively for current user).

The same happens for out of the box config after adding more drives (understand as additional partition with possibility to be non-busy during logout)- using HFS and Server.app, Home Sharing through Server.app, no hacking. With the difference, that the HFS can't umount when busy (which is correct), but ZEVO will after all unmount and fail.

... If Apple tells us, you need additional non Mac server if you buy Mac Mini Server, nobody will buy Mac Mini anymore, right? I don't see no *fundamentals* in unmounting by system mounted data disk directly attached to the mac with media marked as non-removable. But maybe you can be helpful again.
mk01 Offline


 
Posts: 65
Joined: Mon Sep 17, 2012 1:16 am

Re: Automatic login

Post by raattgift » Mon Mar 04, 2013 6:29 am

I'm afraid that all I can say is that if you are unhappy about the way Apple has designed its operating system or its documentation thereof, or its marketing and pricing strategies, you should take it up with Apple through official channels ( e.g. bugreporter.apple.com or apple.com/feedback ).

This thread has strayed far away from troubleshooting the zevo port of zfs.
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Re: Automatic login

Post by raattgift » Mon Mar 04, 2013 6:35 am

"There is nowhere written in the docs"

Please see both paragraphs in the "User Home Directories" section in http://images.apple.com/business/docs/Autofs.pdf

and the mnthome(1) man page.
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Next

Return to Troubleshooting

Who is online

Users browsing this forum: bileyqrkq, ilovezfs and 0 guests

cron