Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so I was editing the name-service/switch service and messed up my nsswitch.conf, I overwrote the "passwd = files" with "passwd = filesasdf" so now I can't auth to the server when I boot that kernel. I can however just boot to the default Solaris 11/11 kernel and auth again just fine the problem is that there has been a lot of tweaking done (not all of it by me, nor necessarily documented) and I would like to be able to auth to that kernel and continue tweaking/tuning/learning and whatnot.

The problem is I have no idea how to go about getting access to the service on that alternate kernel (since Solaris 11 doesn't even use the nsswitch.conf file anymore). I imagine it is just a ZFS snapshot or something that holds the newer kernel so it would likely involve mounting that snapshot and editing whatever file the name-service now looks to (doesn't it have to look at a file at some point?).

In any case, I am also new to Solaris so this is kind of an adventure.

share|improve this question
up vote 1 down vote accepted

If by "booting to another kernel" you mean booting to an alternate Boot Environment (BE), then boot to that kernel, use 'beadm list' to determine which boot environment is the one you need to fix, and mount it.

    beadm mount beName mountpoint

For example, if your broken boot environment is "solaris-2", and you have a working "solaris-1" boot environment, boot into solaris-1, and run:

beadm mount solaris-2 /mnt

Then you can cp your working BE's nsswitch to conf to the broken BE.

cp /etc/nsswitch.conf /mnt/etc/nsswitch.conf

Then, reboot, select the "solaris-2" BE from Grub, and you should be good to go.

share|improve this answer
That would've been exactly what I was looking for, shame I didn't see it before I nuked the entire thing. – Joe Apr 16 '13 at 17:43

I can however just boot to the default Solaris 11/11 kernel and auth again just fine

... so boot to that kernel and undo the damage you did to /etc/nsswitch.conf.
Problem solved. This will cost you five dollars, Charlie Brown.

If your system is hosed to the point where you can't log in boot it in single user mode and fix the file.

share|improve this answer
Solaris 11 no longer uses the nsswitch.conf to manage these things, it's managed via the service. The service, as far as I know, ignores the .conf file now (per the verbiage in the conf file itself). Secondly, if it was even the same conf file I wouldn't be able to authenticate in the first place to log back in. – Joe Jan 15 '13 at 3:27
This is where single user mode comes in Joe... (also the need to fix /etc/nsswitch.conf is taken from your problem description - If you caused the problem by modifying something else, like svc:/system/name-service/switch:default in SMF, you can fix it with the appropriate management command, like svccfg & svcadm...) – voretaq7 Jan 15 '13 at 3:44
I will have another look. I did attempt to use svccfg to fix the problem but it threw a pretty hard error, something like "error on line 28432 in asdf.c" (wish I hadn't closed that ssh window like an idiot). I would guess that error is happening because authentication is all kinds of screwed now, if single user mode stops that error I will be in business. – Joe Jan 15 '13 at 6:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.