SUMMARY: changing someone's home directory using nistbladm

From: Steve Plemmons <>
Date: Thu Jan 15 2004 - 14:20:23 EST
Back in July, Dave Martini posted the following syntax as the proper way to
use nistbladm to edit the value of a table (why are the sun docs so off on


nistbladm -e value=hostname:/export/home2/user
I translated that into the following command for my needs:
nistbladm -e home=/home/faculty2/brenden '[name=brenden]'passwd.org_dir
This works fine from the command line, but I wanted to script this to save
some typing.  Following is the text from a simple example of what I want to
echo "Enter login name: "
MAT=`nismatch name=$USERID passwd.org_dir`
if [ -z "$MAT" ]; then
   echo no such user $USERID
   exit 1
nistbladm -e home=/home/faculty/${USERID} '[name=${USERID}]'passwd.org_dir
Running this script gives me the following output.
Enter login name: 
can't modify entry: Not found.
I know that this is a simple scripting problem with the variable usage or
maybe something to do with the single quotes, but I can't find the answer in
any docs that I have available to me or on the net.  Can someone give me
some advice about the proper syntax for that last line of my script?
Steve Plemmons
sunmanagers mailing list
Received on Thu Jan 15 14:20:11 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:27 EST