HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: useradd and NIS
Operating System - HP-UX
1833750
Members
2364
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
07-29-2004 08:15 AM
07-29-2004 08:15 AM
useradd and NIS
Hello,
I'm supporting a proof of concept in which a centralized account admin team will use an off the shelf product to administer NIS accounts in our HP-Unix NIS domain. The products standard behavior parses variables to the useradd/userdel/usermod commands. The problem is that we use /etc/passwd.global and useradd looks for /etc/passwd. The product is flexible enough to be pointed to another command, so in my opinion, getting ahold of perhaps the Linux source code for the user* commands and recompiling to point to /etc/passwd.global, and then naming it something like useradd.nis would be the best approach.
I know some kind of wrapper could be written to accomplish this, but time is critical so I'm open to other suggestions. The main requirement is that the solution behaves just like useradd and can't be interactive due to the nature of the product. Any suggestions would be welcome!
Thanks,
Eric (not Melanee Haywood)
I'm supporting a proof of concept in which a centralized account admin team will use an off the shelf product to administer NIS accounts in our HP-Unix NIS domain. The products standard behavior parses variables to the useradd/userdel/usermod commands. The problem is that we use /etc/passwd.global and useradd looks for /etc/passwd. The product is flexible enough to be pointed to another command, so in my opinion, getting ahold of perhaps the Linux source code for the user* commands and recompiling to point to /etc/passwd.global, and then naming it something like useradd.nis would be the best approach.
I know some kind of wrapper could be written to accomplish this, but time is critical so I'm open to other suggestions. The main requirement is that the solution behaves just like useradd and can't be interactive due to the nature of the product. Any suggestions would be welcome!
Thanks,
Eric (not Melanee Haywood)
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 09:06 AM
07-29-2004 09:06 AM
Re: useradd and NIS
There's no easy answer to your problem other than to softlink /etc/passwd.global and /etc/passwd. This is why typically /etc/passwd is used as the source for the NIS passwd map on the NIS master server. If you do get the source, I would add an option to specify the passwd file. Your problems also extend to /etc/group as well so rethinking your source files for NIS might well be the least evil answer.
If I were not going to use /etc/passwd and /etc/group for the maps source files, I would be tempted to build a set of user* commands using Perl. You have the getpwnam(), putpwnam() functions along with the crypt() function to generate password hashes.
If I were not going to use /etc/passwd and /etc/group for the maps source files, I would be tempted to build a set of user* commands using Perl. You have the getpwnam(), putpwnam() functions along with the crypt() function to generate password hashes.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2004 01:40 AM
07-30-2004 01:40 AM
Re: useradd and NIS
Thanks for the quick response! Fortunately, we are using the standard group file for the NIS group file,so most of the group related commands will still work. Apparently the thinking of the admin that originally set this up was to separate out the local account entries so they wouldn't be published for viewing by anyone with access to the yp commands. Your Perl suggestion is a good one if I had time (or knew Perl). So I'm still leaning towards the source code option, but can't seem to locate it short of a complete distro or RPM. Does anyone have a suggestion of where I could get them?
TIA,
Eric
TIA,
Eric
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP