home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8121 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.6 KB  |  53 lines

  1. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!copper!slate!bware
  2. From: bware@slate.mines.colorado.edu (Bob Ware)
  3. Newsgroups: comp.unix.aix
  4. Subject: problem with putuserpw subroutine
  5. Message-ID: <1992Jul23.225734.9999@slate.mines.colorado.edu>
  6. Date: 23 Jul 92 22:57:34 GMT
  7. Sender: bware@slate.mines.colorado.edu (Bob Ware)
  8. Organization: Colorado School of Mines
  9. Lines: 42
  10.  
  11. Has anyone had success using the putuserpw subroutine?  
  12.  
  13. The getuserpw subroutine seems to work as advertised, but the putuserpw
  14. routine always bombs with errno pointing to:
  15.  
  16.     Only the owner or a privileged user can perform the operation.
  17.  
  18. This even happens when the struct provided as the argument for the
  19. routine is what is returned from getuserpw, so I know it is not a
  20. problem with the contents of the struct.
  21.  
  22. For example, the following program:
  23.  
  24.     #include <userpw.h>
  25.     #include <errno.h>
  26.     main()
  27.     {
  28.         struct userpw *pwptr;
  29.     
  30.         perror("before getuserpw");
  31.         pwptr = getuserpw("studente");
  32.         perror("after getuserpw");
  33.         putuserpw(pwptr);
  34.         perror("after putuserpw");
  35.     }
  36.  
  37. produces the following output when run as 'root':
  38.  
  39.     before getuserpw: Error 0
  40.     after getuserpw: Error 0
  41.     after putuserpw: Only the owner or a privileged user can perform the operation.
  42.  
  43. Yes, root has write permission for /etc/security/passwd.  This happens
  44. when run on both AIX 3.1.6 and 3.2.0.
  45.  
  46. Is this a bug in AIX???
  47.  
  48. -- 
  49. Bob Ware, System Administrator 
  50. Computing and Networking, Colorado School of Mines, Golden, Co 80401, USA
  51. (303) 273-3987
  52. bware@mines.colorado.edu bware@mines.bitnet
  53.