The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
/etc/shadow update password entry! ( getspent? ) nighter High Level Programming 2 07-14-2008 07:51 AM
Interpreting the encrypted shadow password? keelba Linux 5 03-12-2008 09:13 PM
shadow file after a password reset progressdll UNIX for Dummies Questions & Answers 0 10-31-2007 05:18 AM
I want to append password in /etc/shadow file modgil Shell Programming and Scripting 5 03-22-2006 12:08 AM
remove shadow password gizaa UNIX for Dummies Questions & Answers 2 08-03-2004 08:30 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-14-2008
nighter nighter is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 10
userpw.h AIX ( delete entry from the shadow password database )

HI i need to delete an entry in /etc/security/passwd.
can't find a way to do it with userpw.h api ( AIX ).

the passwd file i delete like this.
Write all entrys to passwd file except the one we are removing.

can't find any function that works like getspent / getpwent do
in AIX userpw api. How do i delete an entry in the shadow file on AIX?

while ((p = getpwent()) != NULL) {
/* Update passwd file if it's not the user we are removing */
if(!(typ==3 && strcmp(p->pw_name,user) == 0)) {
putpwent(p, fpb);
}
}
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0