home *** CD-ROM | disk | FTP | other *** search
- 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
- From: bware@slate.mines.colorado.edu (Bob Ware)
- Newsgroups: comp.unix.aix
- Subject: problem with putuserpw subroutine
- Message-ID: <1992Jul23.225734.9999@slate.mines.colorado.edu>
- Date: 23 Jul 92 22:57:34 GMT
- Sender: bware@slate.mines.colorado.edu (Bob Ware)
- Organization: Colorado School of Mines
- Lines: 42
-
- Has anyone had success using the putuserpw subroutine?
-
- The getuserpw subroutine seems to work as advertised, but the putuserpw
- routine always bombs with errno pointing to:
-
- Only the owner or a privileged user can perform the operation.
-
- This even happens when the struct provided as the argument for the
- routine is what is returned from getuserpw, so I know it is not a
- problem with the contents of the struct.
-
- For example, the following program:
-
- #include <userpw.h>
- #include <errno.h>
- main()
- {
- struct userpw *pwptr;
-
- perror("before getuserpw");
- pwptr = getuserpw("studente");
- perror("after getuserpw");
- putuserpw(pwptr);
- perror("after putuserpw");
- }
-
- produces the following output when run as 'root':
-
- before getuserpw: Error 0
- after getuserpw: Error 0
- after putuserpw: Only the owner or a privileged user can perform the operation.
-
- Yes, root has write permission for /etc/security/passwd. This happens
- when run on both AIX 3.1.6 and 3.2.0.
-
- Is this a bug in AIX???
-
- --
- Bob Ware, System Administrator
- Computing and Networking, Colorado School of Mines, Golden, Co 80401, USA
- (303) 273-3987
- bware@mines.colorado.edu bware@mines.bitnet
-