Solaris - first install
by Derek Sivers
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/sshd.pid`. 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:
useradd -g derek -d /export/home/derek -s /bin/bash -c "Derek Sivers" -m -k /etc/skel 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.
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.
top & whoami
solaris has prstat (http://developers.sun.com/solaris/articles/prstat.html) instead of top, and sh-utils (contains whoami) should be on one of the CDs.
SURPRISINGLY MISSING: whoami
You may want to try /usr/ucb/whoami .
who am i
who(1) accepts the arguments "am i" spaced as such. It's all layed out in the who man page. ;)
/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.
Another /export/home note
For your /etc/passwd entry, reference /home/derek. IE:
There's a great beginner's howto at http://www.cuddletech.com/blog/pivot/entry.php?id=562 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.