generic folders appear instead of applications / netinfo utilities

lethe

Registered
When i first installed OS X, my Dock was filled with folders where the apps should have been. also if i opened the applications window, i saw folders named e.g. Sherlock.app, instead of the sherlock application.

I found a TIL that told me to remove some preference files from /Users/myuser/Library/Preferences, and it also suggested i boot single user and fsck. neither solution worked. i called tech support, they had nothing. then a friend guessed my problem:

after installing the OS, it asks you to create an "owner of the computer" account. with lots of experience with solaris and linux, i assumed that they were saying root account. that is the first order of business after installing linux or solaris. i did not realize that the root account is completely hidden from the user, and that you are just making a user account with administrative rights. when i learned this fact, i reinstalled OS X and it worked. i then submitted to apple s OS X suggestions site that they disallow the user from naming this account root.
 
now my problem is this: i have installed several machines with OS X, and i want to try to restore the OS to working order by managing accounts. i have done similiar fuck-ups to other UNIX OSes, and the solution has always been to boot single user mode, and edit your system files, /etc/passwd, /etc/shadow, or whatever. it works quite well.

i obviously can t fix OS X from the aqua session, because even though the machine will boot-up and auto-log me in, i can t launch the sys prefs app, so i can t manage any accounts. botting single user mode doesn t help, because although i can edit those system files, the OS doesn t use flat files when it is in multi-user mode. it runs the lookup daemon, which queries netinfo by default, and not flat files.

so i boot up and login to the console. it can log in as root, but it is a root account with uid 500 or something, not uid 0, so i know that it is not the _real_ super-user account. i then start playing with the netinfo directories. i create a netinfo directory with all the keys and values as they appear on my working OS X install.

i log in to aqua. no good. i still get no apps. i don t know what this means, but the apps in the dock are question marks instead of generic directory icons. they may have been question marks before on this machine, the folder icons may only have been on the first machine, but i m not sure.

the next thing i try is to set lookupd to query flat files, instead of netinfo. the instructions to do this are in the lookupd man pages. i successfully changed lookupd s configuration, i think, so now i can add users simply by editing /etc/passwd, but i still get no apps when i log in to aqua.

with UNIX systems, the policy is always "the GUI is OK when you need to see graphics, but for system administration, you need to know how to use the command line utilities, in case the GUI can t fix it." this has always been a successful policy with other unices, but so far i am stuck with OS X. reinstalling maybe the bests option even if i can fix it, because i may have screwed it up in ways that i can t anticipate. but i would still like to figure out how to get aqua to recognize my changes to the sytem configuration
 
i have noticed on my working OS X system, that i can add a user using the niutil command utility, it works fine. i have to create his home directory and everything, but it works fine. i can login to Darwin through a telnet session, and i can login to aqua with this new user.

however, if i open system preferences->users, this new user does not show up in my list of users. this suggests to me that there are gaps between darwin s config files with netinfo, and aqua.
 
the solution to all my problems of many months ago is to boot single user, and use the nicl command. it can edit nnetinfo databases even though the netinfo daemons are not running.

it would have saved me many hours if i had known about this one.

so if you ever screw up your netinfo database, and can t login, boot single user mode and try the nicl command
 
I did the same thing, installed osx and typed 'root' for my user name. And I agree, apple shouldn't let the setup program accept 'root'.

My solution was to call apple. After several days of trouble shooting, the guy finally says 'so whats your login, anyway?'

I re-installed, and all was good. Didn't think to edit the passwd files.
 
it s nice to hear that i am not the only one who did that. i thought that OSX was giving us the choice to name the root user something else, but why would i want root to be anything else?

i did it to 4 new computers at work, and then none of them worked. it was a good thing that we weren t ready to roll out OSX. furthermore, the symptoms that occur mislead me (applications appear as folders), because that is a known problem if some preferences get hosed. so i was trying to fix it that way.

once i figured out what the problem was, it was easy enough to reinstall on my computer which has the OSes on seperate partitions. but then what was i going to do to the computers at work that had peoples work on the OS9 side? manually deleting OSX files did not work, because i guess i didn t get all the hidden files or something.

it was terrible. i wish i had found this command. (it was somewhere in the mailing list archives of darwinfo.org). keep it handy! read man nicl and you can fix this if it ever happens to you.

by the way kilowatt, all the vendors i looked at were back ordered for the combo drive, but i ll let you know how it works
 
in theory, testuser, those commands would be exactly what is needed. however, when you boot to single user mode, none of the netinfo daemons are running, so attempting to run niload or nidump or niutil fails. this is the kernel of my problem.
 
lethe,
Its worth noting here that the root user isn't renamed. The user you create on start up is in the wheel group. So it has some root-like attributes, but its not root. And if you look at the process running, you'll see that many are run by root.

to set the password for the root user, there are two ways:
1) open the terminal as the user you created on install, or any other admin user.
type sudo passwd root
enter *your* password
now enter your desired root password.

2) the netinfo manager way:
Launch the Netinfo Manager, located in /Applications/Utilities/

Once inside, go to the Domain menu, select the Security sub-menu, and choose "Authenticate".

Type your password here.

Next, go to the Domain menu, seelect the security sub-menu, and then select 'Enable root user'. there ya have it, to change root's password, just select 'change root password' from the same sub-menu.

you might think this is a security issue, but every admin on the computer is allowed to sudo. So just choose with care which users are granted admin status, and all should be fine.
 
thaks for the tip, but as soon as i learned that the accoutn i create at install time is not the root account,. i looked into it, and learned all about the _real_ root accoutn. i know how to enable it and everything, and i have become proficient at administrating OSX from the command line.

i just posted here to give new users the info about how to fix their system if they make my mistake. i had to learn about the OSX root account the hard way. but lets clarify it for everyone else who might make my mistake at first too.
 
so the root account seems absent at first, but it is always there. you can enable it by looking in netinfo manager, or by issuing a few commands at the command line.

what i really want to do with this thread is tell people how to fix their system if they screw up their netinfo databases. one way to screw them up badly is to make the stupid mistake that i did: name the admin account root. but there are many other ways that it could happen, and we should all know how to fis it.

under other UNIX systems, if you screw up the login files badly enough that the system is unusable, so that you can t loogin, or some other fatal problem, then you have to boot single user mode (off the install disk if necessary), and edit the files with your text editor.

with OSX, that won t work, because the system files (/etc/passwd, eg) by hand has no effect, because those files are not used by the system in multiuser mode. the netinfo databases are used instead.

to further complicate matters, you can t edit the netinfo databases with the regular netinfo management commands (niutil, niload, nidump) because they crash in single user mode, because the netinfo daemons don t run in single user mode. if you look at these filese, they will tell you exactly this information. they then suggest that you consult man niutil, or something. i did consult niutil, and it told me how to fix my problems, but.... like i said, niutil won t work in single user mode. so i am stuck with a system that i can t log in to if it s in multiuser mode, but i can t change the system file in singel user mode, because the command for changing the system config (niutil) won t run in swingle user mode. it is quite a chicken-egg dilemma.

but there is a command for editing the netinfo databases, which doesn t use the netinfo daemons. it is nicl. it will edit the files without consulting the daemons, and it works without complaint in single user mode. the man pages for niutil do not refer you to nicl at all, so i had no way of knowing how to edit my system if it became too screwed up to use.

i even resorted to this solution: i booted OS9, deleted all the files i could find that had anything to do with OSX, and then reinstalled OSX. but there are invisible files that i did not find, so even after completely reinstalling the OS, i still could not login. deleting all the files manually is quite a messy method, if you can get it to work at all, which i couldn t.

if i had OS9 and OSX installed on seperate partitions, i could just reformat the partition, but with the apple default install, that is not possible, i would lose vital data.. so any OSX sysadmin _must_ be aware of the emergency methods of making a system usable, and that includes editing the netinfo databases with the nicl command in single user mode.

another option would be to change lookupd to consult the flat files first, before netinfo. it would make the system much more like other UNIX systems in behavior, but you would have to manually change it for every system, since it is not the default behavior. if you had made that change though, then if things got screwed up, and you couldn t loging to the sytem, then you could just boot single user mode, and edit the files. this is exaclty how you fix broken systems under linux or solaris or any other UNIX system. i think from now on that is how i will manage my systems (since i will never use the great functionality that netinfo has to offer). if you don t use any directory services, then you might consider following my example, although i think these netinfo directory servidces have some cool features that i schould try to take advantage of.

anyway, read man nicl. maybe i will put a step by step manual up here on how to make your system functional again after you have screwed it up too badly. remember that if you screw it up to only a little extent, it may still be bootable, and you can login, but all applications appear as folders, and the fix that apple suggests for fixing this problem does not work at all, and has no effect. then nicl in single user mode is for you
 
Hi,

I am having the same problem described in this thread bu I am not Unix savvy.

Is there a way to solve the "generic folders" problem by reinstalling OSX without knowing Unix?

If yes, what do I do?

I have tried the Apple posted solutions (disk repair and removing preferences) without success.

I am new to this forum and this is my first post.

Thank you.
 
yes, reinstalling should work, if you reformat the drive. if you don t want to reformat (for example, you don t want to lose your OS9 on the same partition), then you can try to delete the OSX files manually. that didn t work for me, i suppose because of invisible files. i have seen threads with infos on what files needed to be removed.

but anyway, the short answer is yes, reinstalling should work.
 
Back
Top