Posted in Programming, Solaris on 04/08/2009 08:00 am by jmccune
Using OpenSolaris 2008.11, it appears the most complete way to obtain a full-featured development tool chain is to install the ss-dev and gcc-dev package clusters.
pfexec pkg install gcc-dev ss-dev
References:
Posted in Media, Solaris on 04/07/2009 08:00 am by jmccune
I spent the better part of the evening attempting to get a reliable, responsive and otherwise unobtrusive DLNA media server running on my new OpenSolaris home file server. I finally stumbled upon PMS which “just works” after using X11 forwarding over ssh once in order to get at the GUI configuration screen. I went ahead and tried the Linux tarball. None of the included binaries execute on solaris, but the jar file appears to run great.
Once running, my PS3 sees the media player quickly and easily and streams my MP3’s nicely.
I’m planning on cooking up a SMF profile to keep this running as a service and figure out the mplayer calls in order to stream my favorite web streams directly to the PS3.
Other DLNA media servers I tried were Coherence (no documentation, didn’t work out of box), Mediatomb (needed to hack the source to get it to run on solaris. When running, rarely showed up in the XMB), fuppes (compile issues).
Posted in Solaris, System Administration on 04/03/2009 07:00 am by jmccune

Solaris
Contrary to recommendations from seasoned Unix admins, it’s perfectly acceptable to change the root shell from the bourne shell to something like bash. The most common reason to leave the root shell alone usually goes something like, “you need a valid and statically linked shell defined in /etc/passwd to boot into single user mode if you need to recover your system.”
There’s a really nice list of Solaris root shell misconceptions published at http://www.roble.com/docs/sol_root_shell.html.
Fortunately for me, this isn’t the case in Solaris 10. While setting up a new Solaris 10 system today, I accidentally set root’s shell to /sbin/bash instead of /usr/bin/bash. /sbin/bash doesn’t exist, so I could no longer log into the system.
Luckily, this is a system with a Dell RAC card setup for remote console access. I logged into the RAC and issued a “graceful shutdown” power off command, which Solaris responded to nicely and brought the system entirely down. Once I powered the system back on, it’s simply a matter of booting into single user mode by passing the -s flag to the kernel.
Solaris 10 is smart enough to fall back to /sbin/sh if it can’t invoke the shell defined in /etc/passwd booted into single user mode. So long as you don’t horribly mangle /sbin/sh and the libraries it’s linked to, you’ll be fine changing the root shell to anything you like.
Here’s how it went:





Posted in Uncategorized on 04/02/2009 12:45 pm by jmccune
Today, I setup my new Atom 330 based OpenSolaris 2008.11 file server to share files using windows file sharing. Windows file sharing uses the SMB/CIFS protocol and is commonly implemented using Samba on Unix. With OpenSolaris 2008.11 and zfs, however, the SMB/CIFS protocol is implemented in the kernel itself by way of an SMB module.

Sun Solaris
Unfortunately, it’s not quite as simple as executing zfs set sharesmb=on dpool/export/dozer. The SUNWsmbs and SUNWsmbskr packages need to be installed, the system needs to be rebooted, pam configured to create smb password hashes, passwords reset, and finally the smb SMF service needs to be enabled.
You may need to create new filesystems with the casesensitivity and nbmand zfs properties set correct and copy your data over to these filesystems.
Here is the transcript:
pfexec pkg install SUNWsmbs
pfexec pkg install SUNWsmbskr
pfexec reboot
pfexec svcadm enable -r smb/server
pfexec zfs create -o casesensitivity=mixed -o nbmand=on dpool1/export/dozer
pfexec zfs set sharesmb=on dpool1/export/dozer
pfexec bash -c "echo 'other password required pam_smb_passwd.so.1 nowarn' >> /etc/pam.conf"
pfexec passwd jmccune
You must reset your password to generate the new SMB hash value. All users that need SMB access will need to reset their password in this manner.
You may check the sharing status with sharemgr;
jmccune@rain:/export/dozer/isos$ pfexec sharemgr show -vp
default nfs=()
zfs
zfs/dpool1/export/dozer smb=()
dpool1_export_dozer=/export/dozer
dpool1_export_dozer_documents=/export/dozer/documents
dpool1_export_dozer_isos=/export/dozer/isos
dpool1_export_dozer_movies=/export/dozer/movies
dpool1_export_dozer_music=/export/dozer/music
dpool1_export_dozer_pictures=/export/dozer/pictures
Troubleshooting.
svcadm may speak up about a dependency on the physical network. This does not appear to be an error.
jmccune@rain:~$ pfexec svcadm enable -r smb/server
svcadm: svc:/milestone/network depends on svc:/network/physical, which has multiple instances.
You may receive an error that sharing failed. In order to resolve, make sure you’ve done everything I listed above and rebooted the system.
cannot share 'pool/media': smb add share failed
References