Solaris - first install

by Derek Sivers

I installed Solaris Express from 5 CD-Roms (downloaded & burned from on to my dual-core AMD64 box, pretty much as described, here:

I installed the "Common Desktop" because I was curious about it, but I've decided I'm probably never going to use this as a desktop or laptop, so instead I stuck the PC in the closet, and I'm only accessing it via SSH.

Since that's how it's going to be : just servers in our cabinet : that's how I want to learn to access it. Everything on the command-line. For future installs, I'll make sure to not even install any of the GUI/X11 stuff.

First thing I noticed:
No users created. Only root.
Root doesn't have a home (/root/) directory, either, it just uses /. Since sshd doesn't allow root login by default, this would have to be done at the console (with keyboard+monitor attached) before turning it into SSH-only access.

For my testing, I changed /etc/ssh/sshd_config to allow root access, and kill -HUP `cat /var/run/`. Now I can log in as root. (I wouldn't do this for a public/production server. I'd just add user accounts immediately.)

When I go to add user accounts, I notice two strange things:

1. no "walk-through" script, that prompts you for users' groups, passwords, and all that.

2. even though /home/$username is the default, it won't let you create anything there. You have to create home directories in /export/home/$username, though I don't know why, yet. Apparently it's going to be mounted later

I have to create my own user, like this:

groupadd derek

useradd -g derek -d /export/home/derek -s /bin/bash -c "Derek Sivers" -m -k /etc/skel derek

passwd derek

Then I have to rename local.profile and local.chshrc to .profile and .cshrc.

I make a .ssh dir && chmod 700 .ssh then copy my ssh2 keys into its authorized_keys.

Now I'm in at a familiar shell.

* top
* whoami


2006-03-26 15:26:07
There is a GUI way to create users
I am currently running Solaris 10 on an AMD64 and I was also very surprised that /root was not created but I went ahead and moved root's home directory to /root myself.

There is a GUI management program called (I believe) smc which makes it easier to create users among other things. Also, if you want more of the GNU programs installed you can get them from See for more information.

2006-03-26 15:26:59
top & whoami
solaris has prstat ( instead of top, and sh-utils (contains whoami) should be on one of the CDs.
2006-03-27 08:51:47
You may want to try /usr/ucb/whoami .

Also /usr/ucb/uptime .

Other BSD compatibility items may be found in
/usr/ucb .

2006-03-28 08:20:58
who am i
who(1) accepts the arguments "am i" spaced as such. It's all layed out in the who man page. ;)

prstat is -way- better than top. It has all sorts of cool solaris options.

Check out prstat -L and prstat -m
Or just jump to the wonderful 'sar' program.
2006-03-28 10:12:45
/export/home is a hold over from back when Sun assumed that every install was going to be a NFS server hosing home directories. It's just one of those things that you get used to. In fact I symlink it on Linux boxes I manage now.
2006-03-28 22:25:24
Another /export/home note
For your /etc/passwd entry, reference /home/derek. IE:


In the /etc/auto_home file, add this entry:

derek -fstype=lofs :/export/home/derek

This allows you to easily mix local and NFS mounted home directories.

Jason Antman
2007-09-26 22:32:05
There's a great beginner's howto at which explains the logic behind the whole /home and /export/home thing - I actually think it's great. When I had 2 systems it was different, but now that I have a good dozen boxen, I wish that my Linux distro had thought of these usability features.

Most of my boxes have CLI only, especially the servers. That being said, I think that CDE is minimalistic enough to run on servers without a lot of overhead, yet it gives me everything I want. The performance monitoring tools (like having the performance meter always there on the taskbar) are wonderful.

As to adding users, you'll want to use the Solaris Management Console, which is actually a GUI program. Check it out. If you're coming from Linux like me, you'll be flat out STUNNED by the features. And it lets you manage any server on your LAN from the one console.