Sunday, March 09, 2008

Modify Information in a Nisplus Table

The nistbladm command is used to modify information in a nisplus table. In this example, the passwd.org_dir table was modified. The login directory and shell was modified for the esoft user. Here is the syntax.

Prior to modification
# niscat passwd.org_dir | grep esoft
esoft:SNVE9mJSZ9ub6:1005:10:Test Account:/export/home/esoft:/bin/sh:13947::::::

Modify the user's home directory
# nistbladm -e home=/home/esoft '[name=esoft]'passwd.org_dir
# niscat passwd.org_dir | grep esoft
esoft:SNVE9mJSZ9ub6:1005:10:Test Account:/home/esoft:/bin/sh:13947::::::

Modify the user's shell
# nistbladm -e shell=/bin/zsh '[name=esoft]'passwd.org_dir
# niscat passwd.org_dir | grep esoft
esoft:SNVE9mJSZ9ub6:1005:10:Test Account:/home/esoft:/bin/zsh:13947::::::

###
Add a user
# nistbladm -a name=softhub uid=1000 gid=10 home=/home/softhub shell=/bin/zsh passwd.org_dir

No comments: