- This topic has 13 replies, 7 voices, and was last updated 15 years, 11 months ago by
chops.
-
AuthorPosts
-
September 18, 2008 at 8:51 pm #374166
Spyke
ParticipantSo I’ve been having trouble getting create user to work correctly, or I’m missing it is but I’m missing something really obvious.
Is it simply that I configure it how I want it and place the package in the custom pkg folder within InstaDMG? If thats the case, the problem I’m having is after imaging the machine, unlike instaUser the image boots up like its a fresh install of mac osx and wants owner information filled out again? Its a minor detail yes, but i want to avoid it because this image is going to be mass distributed.
New to all of this
Any help would be greatly appreciated
September 19, 2008 at 8:01 pm #374189jasonpgignac
ParticipantAll that the package does is create a user – if you went through the wizard, and got in the OS, you’d (presumably, if you have done it irhgt) see the user already exists. There is another package – clearReg I think it’s called – that removes the registration wizard for you. You need to install it. It’s available in the file section, here
September 22, 2008 at 7:37 pm #374206Spyke
ParticipantAwesome, that was exactly what I was looking for. Thank you for your help
March 31, 2009 at 7:30 pm #375863aaronwyatt
ParticipantFor some reason, the CreateUser package runs and works mostly fine, i.e. it creates an account with the encrypted password I specified, but it also is missing some stuff. Every single time I create an image with InstaDMG, the user account created is missing the following folders from the home directory:
•Documents
•Public
•Sites
•Music
•Movies
•PicturesAlso I found this primary user account has cached info stored in the “Connect to Server” dialogue box. Any thoughts on how or where I’m dragging this in from? I use the same account username and password in the default account as is on the machine I’m “building” the image on, so is it possible that CreateUser is confused about where the account lives?
April 1, 2009 at 2:08 am #375866Rusty Myers
ParticipantI’ve seen this too. I haven’t taken the time to care, yet.
The createUser package, I don’t think, creates a home folder. I don’t see it in the code.
I have the some of the same files missing as you. So I’m thinking that one of the packages is creating the home folder from a package. My accounts are the same that I make with createUser and I package apps with. I have used composer, pkgdiff, and packagmaker packages. I’m guessing that within one of the packages there is a home folder created with that account name.
The system needs the Library folder, so it creates that, if nothing else has. I’d be willing to bet the Desktop folder is the same. Not sure about Downloads, maybe it’s needed?
Do you have any packages that could install something to that “users” folder?
Rusty
April 1, 2009 at 1:56 pm #375868aaronwyatt
ParticipantI’ve also run InstaDMG from a different account (that is, different username and password than the account I was adding via CreateUser) and i still had these symptoms. However, an account with the username I was creating existed on the local machine (just not logged in as it) as well as the server.
April 3, 2009 at 3:55 pm #375916Patrick Fergus
Participant[QUOTE][u]Quote by: aaronwyatt[/u][p][i]Also I found this primary user account has cached info stored in the “Connect to Server” dialogue box. Any thoughts on how or where I’m dragging this in from? I use the same account username and password in the default account as is on the machine I’m “building” the image on, so is it possible that CreateUser is confused about where the account lives?[/i][/p][/QUOTE]”Favorite” servers are in ~/Library/Favorites. To see if it’s pulling from the account you’re currently logged into, put a few dummy “Favorites” in the “Connect to Server” dialog and see if they get pulled along at image creation time.
Also, can you examine the InstaDMG output DMG and see what exists in /Users/*username* ?
– Patrick
May 12, 2009 at 3:10 pm #376163chops
ParticipantI too am getting incomplete user directories with creatuser. So how does one go about creating completed user directories, or completing the ones created by createuser? Surely I am missing something here?
May 12, 2009 at 7:00 pm #376164knowmad
ParticipantAh, the joy of having made a mistake and being able to help others avoid it(or at least recover from it).
I ran into this issue myself some time ago.
I was convinced I had done everything just so, and was still getting incomplete new user accounts.
Then I did some heavy reading (would have been much easier if I had searched these forums or the macosxhints.com forums, but instead I read apple white papers, knowledge base, manuals, etc… yuck).The problem (just to be clear): After creating a new user via a script, you log into that account to find it does not match the default user setup you created in /System/Library/User Tempalte/English.lproj, and in fact is missing folder/files.
The reason: The OS will only populate a new user account if it is actually empty when it finds it the first time. While this may have many useful and logical reasons for being the default behavior, it is n this case annoying. How could this be the cause of ‘my’ issues? ‘I’ did not put anything into the new user account, this is the first time ‘I’ am logging in!
Well, yes BUT… In my case i found the answer in a few of my other installer packages, and scripts. I was writing stuff to the preferences folder of my new user. This created a library/preferences folder and several plist files. The OS then refused to overwrite those, and in fact wrote nothing new from the default setup, creating my half setup wierdo account.The Answer: VERY carefully go through your scripts and installers and see what gets added to the user folder.
Reroute everything that can be rerouted to the default profile in english.lproj, and postpone the rest until after first login.Simple but annoying.
I hope this helps.
May 12, 2009 at 7:01 pm #376165knowmad
Participantfor the record, I use create user, and the only changes I made were to scripts OTHER than create user, and I no longer have the half created user issue.
May 12, 2009 at 9:08 pm #376167chops
ParticipantThis morning I altered things a little (moved the createuser pkgs (for three users) into separate numbered folders in CustomPKG) and ran the thing again. Figured I’d just set up admin, faculty, and student users in one go. I checked the image before writing it to my test Mac and found no user directories at all. Imaged and booted test Mac anyway, just to see what would happen. The startup sequence skipped the registration (per clearReg.pkg) and gave me a login screen with my three users on it. Right user names, wrong icons, and I couldn’t log in with any of them.
I am at the “let’s see how this works” stage with instaDMG, so the only CustomPKGs I have are three createuser and clearReg. I only changed the USERDATA file inside the createuser package. Was there something else I was supposed to do? Do I need another package to insert the directories?
I’m afraid I don’t understand what you’re saying, knowmad, as I have things pretty simplified already, AFAIK. Am I supposed to go through the createuser script itself?
May 13, 2009 at 1:13 pm #376169aaronwyatt
Participant[QUOTE][u]Quote by: knowmad[/u][p]
The Answer: VERY carefully go through your scripts and installers and see what gets added to the user folder.
Reroute everything that can be rerouted to the default profile in english.lproj, and postpone the rest until after first login.
[/p][/QUOTE]Knowmad– I like the theory, and that may be it, but not quite for the reason you say. Createuser is the last script I run, so how can previous installers be aware of the account it creates and put file’s in its home directory? Well, as I said in an earlier post, the account it creates happens to match an account already existing on the build machine. And since I packaged some of the custom apps on the same image as this build machine I suspect they are somehow touching this createuser-user’s home directory (even though i checked and they _install_ nothing to it). so in my case it might be a combo of building packages with an account that both exists on the image-build machine and is being creating by createuser in the image build process?
i’ll try rebuilding my image on a machine where the createuser-user account does not exist. if that doesn’t work, i’ll have to change the short name of the createuser-user and see if that works. since i have so much free time, i’ll just whip this right up….
May 13, 2009 at 11:53 pm #376170knowmad
ParticipantOUCH, ok I guess I was not as helpful as I thought I was.
Either that, or I am flat out wrong (always possible).Ok, last in first out: AaronWyatt, your on the right track as far as I am concerned to figure this out, but your gonna kill yourself doing it the long way. Easiest way to check your setup is to run instadmg again, using the cached base os image (to shorten build time, this happens automatically assuming you make no changes to the source disk image or the choices file) and the only custom packages you should run are your createuser package and the clearreg.
Boot something from the resulting image and see if you get a fully loaded home folder.
If it works, its one of your other packages. If it does not work, I am wrong.
Now, for what Chops was saying…… um….. I got no good answer. I can tell you that all I am doing to the create user script is making a password hash and editing the userdata section. It works for me (though you have made me curious and I will be making new image tomorrow night to check). None of that helps you and is not what you wanted to hear. BUT going back to what I always tell my team/friends/family/clients/etc… start from the basic and go from there. Rebuild once more, but keep only one instance of the createuser and see what you get.
here, for the fun of it, is one of my USERDATA files:
[code]
#replace these values with your own. Comment out to use defaults
shortname=localadmin
longname=”LocalAdministrator”#leave blank for next available uid
uid=499#leave blank for 20
gid=20#leave blank for /bin/bash
#shell=”/bin/bash”#leave blank for /Library/User Pictures/Nature/Zen.tif
#pic=”/Library/User Pictures/Nature/Zen.tif”#uncomment to set password (not recommended since password is clear text)
#if blank, it will use password hash file “password_hash”
#password=”mypassword”#guid, leave blank for auto gen
#GUID=D4F8BFC9-8EC8-4645-A739-516F59571A2E#admin
#1 – add to admin group
#0 – don’t add to admin group
admin=1[/code]
I hope that helps, and we can all compare notes in a few days with further testing.and as a final item, Aaronwyatt, check that your not writing defaults to the user’s prefs folder… thats the one that got me when I started.
May 14, 2009 at 6:38 pm #376172chops
Participant[QUOTE][u]Quote by: knowmad[/u][p]
Now, for what Chops was saying…… um….. I got no good answer. I can tell you that all I am doing to the create user script is making a password hash and editing the userdata section. It works for me (though you have made me curious and I will be making new image tomorrow night to check). None of that helps you and is not what you wanted to hear. BUT going back to what I always tell my team/friends/family/clients/etc… start from the basic and go from there. Rebuild once more, but keep only one instance of the createuser and see what you get.[/p][/QUOTE]Thanks, knowmad. I did indeed cut the creatuser scripts down to one only (I can always create the other users in the first-run startupitem). In addition, I had been trying to create a user that already existed on the Mac I was using to create the image. This is apparently a no-no, so I invented a completely new user for the createuser script and built my image again. Success!
Thanks again for your help and patience. Next step is to play with that first-run startupitem…
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed