Update NIS+ data


 
Thread Tools Search this Thread
Operating Systems Solaris Update NIS+ data
# 1  
Old 03-26-2008
Update NIS+ data

Hi,

We are running NIS+ in our UNIX enviroment at work. I am now trying to add and update information in the passwd_org.dir file, but I'm not quite there yet...

If you type
Code:
niscat -o '[name=adam77],passwd.org_dir'

You can see all the fields you can modify..

Is there a way to update the information in the passwd_org.dir file for all the users in the database? What I want is to add som text in the 'gcos' table, the field where you can type some info about the user.

I can list all the users with
Code:
niscat passwd.org_dir| cut -d: -f1,5

, and then do some magic with 'sed', like so:
Code:
 niscat passwd.org_dir|cut -d: -f5 |sed 's/^/BK\/C\/\/DJ\/\+/g'

to add the desired text in front of all the rows. But how do I apply the changes back to NIS?

Can you add variables in to the 'nistbladm' command?


Thank you!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to update data in a file

Hi, I need a script to update a line in a file with a file name everytime it runs. For example below are two files each files contains two rows(say 4&5) which needs to be updated with a file name abc.param xyz.param Now below are two filenames which have date and time appended to... (1 Reply)
Discussion started by: sv0081493
1 Replies

2. Solaris

NIS slave unable to copy the data bases

Hi, I'm learning for my Solaris 10 sys-admin part 2. I'm now trying to get nis working because for the exercise. I run in to a problem. Setup: Three Systems solaris101 (client) Nothing wrong here havent made any config changes yet. solaris102 (master server) Interfaces ... (1 Reply)
Discussion started by: jld
1 Replies

3. Shell Programming and Scripting

Validating that the NIS and NIS+ services are disabled

I'm creating a scrip for auditing our AIX box's to ensure that they are built according to our system standards. I'm not sure on the logic for checking to see if the NIS and NIS+ services are disabled. any idea's? (2 Replies)
Discussion started by: sport
2 Replies

4. Shell Programming and Scripting

How to update data between xml tags

Is there a way to modify Non Null data between <host> and </host> tags to a new value ?- may be using sed/awk? I tried this sed 's|.*<host>\(?*\)</host>.*|\<host>xxx</host>|' but it is updating the host which has null value - want opposite of this - Thanks in advance for you help!! For... (2 Replies)
Discussion started by: harry_todd
2 Replies

5. Shell Programming and Scripting

data base update

hello everyone I need to update data base in file 1-ID 2-Name 3-ID group 4-ID teacher 5-mark list unique ID is (ID+ID group+ID teacher) we can append 5 th columns (marks list) main base file: Code: 1:John:3:1:4 3 2 2:Mark:1:2:1 3 3:Susan:3:4: input file: (1 Reply)
Discussion started by: mleplawy
1 Replies

6. Solaris

NIS password file update issue

Hi Our nis server running on Sun solaris 8 operating system. I have added a new user in the nis passwd file & when I am trying to update the file from nis server by using following command: # cd /var/yp # make updated passwd It updates the passwd file but does not come back to command... (3 Replies)
Discussion started by: dolphin
3 Replies

7. Solaris

How to configure a NIS client bound to the NIS server in another subnet?

Hi, all. I have a Solaris client here needs to bind to NIS server in another subnet. Following is the configuration i made on the client, 1) edit /etc/inet/hosts to add an entry of the NIS server -- nserver01 2) execute `domainname` to set local NIS domain to the domain of the NIS server.... (1 Reply)
Discussion started by: sn_wukong
1 Replies

8. UNIX for Advanced & Expert Users

SUSE 9 and 10 NIS clients with RedHat 8.0 NIS server not working

We have a RedHat 8.0 NIS master, with a RedHat 8.0 NIS Slave. We also have a small number of SUSE 9.1 and SUSE 10 machines here for evaluation. However, no matter what i do, the SUSE machines will not talk to the NIS Servers. If i broadcast for NIS Servers for the specified NIS domain, it... (1 Reply)
Discussion started by: fishsponge
1 Replies

9. Shell Programming and Scripting

How to compare data in two flat files and update them?

Hi All, I am giving an example similar to the problem I have. I have two data files of 10 columns each in which fields are delimited by comma(,). I need to compare compare the two files using the uniq col(col3). If there are any records in file1 and are not in file2 then I have check the value... (3 Replies)
Discussion started by: rajus19
3 Replies

10. UNIX for Dummies Questions & Answers

NIS map mail.aliases specified, but NIS not running

Hi all, I just took over the admin role from someone and I wanna setup sendmail (just to send mail from the host) however, after I config all the resolv.conf, nssitch.conf, hosts file and when I try to send a mail out, after I punched ctl-D, it returned he following, "NIS map mail.aliases... (2 Replies)
Discussion started by: stancwong
2 Replies
Login or Register to Ask a Question