|
SUMMARY: changing someone's home directory using nistbladm: msg#00076os.solaris.managers.summaries
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 this?). nistbladm -e value=hostname:/export/home2/user '[key=username]'auto_home.org_dir 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 do: #!/bin/sh echo "Enter login name: " read USERID MAT=`nismatch name=$USERID passwd.org_dir` if [ -z "$MAT" ]; then echo no such user $USERID exit 1 fi nistbladm -e home=/home/faculty/${USERID} '[name=${USERID}]'passwd.org_dir Running this script gives me the following output. Enter login name: brenden 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? Thanks, Steve Plemmons |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | SUMMARY:deleting a user from passwd table: 00076, Dave Martini 1 |
|---|---|
| Next by Date: | SUMMARY: IP Multipathing, Sun Cluster 3.1: 00076, Gary Chambers |
| Previous by Thread: | SUMMARY:deleting a user from passwd tablei: 00076, Dave Martini 1 |
| Next by Thread: | SUMMARY: IP Multipathing, Sun Cluster 3.1: 00076, Gary Chambers |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |