chsh is great when you need to change default login shell for a lot of users.
for f in $(grep home /etc/passwd | grep -v ftp | cut -d':' -f1) ; do
chsh -s /bin/sh $f ;
You would of course have to refine the grep line to sort out accounts you don’t want to change default login shell for .
At work we are getting more and more Solaris box’es. Zones in Solaris are great for delivering secure webhotell and email services for large amounts of customers.
But, coming from Linux, Solaris can be a bit frustrating at first. Though Sun has released a OpenSolaris version, development there aren’t even close to what I’m used to in Linux.
I find it a bit interesting looking at Solaris ’cause it shows the power of a open source community, while one can get a bit spoiled in a mono Linux environment I easily take for granted all the great tools available at a Linux box.
Anyway here’s some useful stuff I’ve found out which makes it, for me, a lot easier to get friends with Solaris.
First of all, stuff like using pageup/pagedown keys in manual pages or even with ‘less’ is not common in a default Solaris 5.10 installation.
Since we’re more than one sysadmin at our Solaris box’es, I’ve setup my own environment and alias for commands.
I put a file called jjprofile at every box, and then I have to source the file ($ . ./jjprofile) every time I’ve logged on. A more elegant approach would of course to put this stuff in .bashrc or what ever the file being sourced when logging on.
#when using packages from http://www.blastwave.org/index.fam
#preferably hit those binaries before Solaris' binaries in the PATH
#less is more (Solaris defaults to more)
export PAGER="less -iMsq"
#include man pages from blastwave packages
#using terminfo from blastwave let
#you use pageup/down and arrow keys and so on in man pages, less and vim
# some aliases, I want to use the
# gnu binaries which I'm used to
alias vi='/usr/bin/env TERM=xterm-color vim'
alias ls='gls --color=auto'
alias ll='gls -l --color=auto'
Regarding references to blastwave, more info at blastwave.org.