- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problems with programmatically executing usermod/u...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 03:18 AM
01-13-2004 03:18 AM
I am new to this forum, so please forgive me if I make any mistakes.
I am working on an application that performs account manipulation, such as useradd, userdel and the like. This application works great on 11.00, but I have some problems on 11.11 with the shadow password bundle. I am compiling on 11.00, for what it's worth.
I have no problems with the useradd command.
My application is getting an error when trying to execute usermod -g
Cannot modify the entry in the /etc/passwd file.
The command actually does perform the action. When I check the /etc/passwd file, the group/shell has been changed as requested.
My application is also getting an error when trying to execute a userdel
Cannot delete entry from /etc/passwd file.
The entry DOES get deleted from the passwd file, but remains in /etc/shadow.
If I execute these commands from the command line, they work perfectly.
I installed patch PHCO_29269 in the hopes that it would help, but it did not.
I have written a small C program to test with, and have attached the source to this post. To execute it, I compile it as commandTest and type ./commandTest "
I appreciate your time.
Regards,
kellye
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 03:26 AM
01-13-2004 03:26 AM
Re: problems with programmatically executing usermod/userdel on 11.11
Verify that there is no corruption in the passwd or group files - run
pwck & grpck
and fix any problems reported.
Also verify that you have *all* the pre-enablement as well as required patches for shadow - there were a lot of them IIRC.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 03:50 AM
01-13-2004 03:50 AM
Re: problems with programmatically executing usermod/userdel on 11.11
Points forthcoming.
kellye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 04:39 AM
01-13-2004 04:39 AM
Re: problems with programmatically executing usermod/userdel on 11.11
Since your program does nothing but running the commands, I guess the problem is with the tcb database itself.
Do you get the same results if you run the command "userdel dummy" instead through the c-program?. If not, then you will need to follow Jeff's suggestions.
I infact compiled your program onto my workstation and ran it. It worked just fine. My workstation is with June 2003 bundles.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 05:46 AM
01-13-2004 05:46 AM
Re: problems with programmatically executing usermod/userdel on 11.11
Just a thought.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 06:05 AM
01-13-2004 06:05 AM
Re: problems with programmatically executing usermod/userdel on 11.11
When I manually run the commands, they work perfectly. The only time I have a problem is when I execute them from my program.
I'm currently investigating which patches I need and which ones I'm missing.
Thanks,
kellye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 06:07 AM
01-13-2004 06:07 AM
Re: problems with programmatically executing usermod/userdel on 11.11
I'm sequentially creating the user, modifying the user then deleting the user (programmatically), so having the user logged in shouldn't be a problem. I'm currently the only person using this particular machine.
Thanks,
kellye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 06:17 AM
01-13-2004 06:17 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 06:39 AM
01-13-2004 06:39 AM
Re: problems with programmatically executing usermod/userdel on 11.11
You hit it on the head, when I modified the program to use system() instead of popen(), all of the calls worked.
My question now has to be why would these calls work with popen() on 11.00 and have a problem on 11.11. Is it due to the shadow file somehow?
Thanks!
kellye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2004 06:44 AM
01-13-2004 06:44 AM