- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help needed with batch password script - urgent(!)
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
10-28-2008 02:31 AM
10-28-2008 02:31 AM
We use a script called 'batchpw' which allows us to add users to the system in batches. Since last week, this script has started to fail and yet we're not aware of anything changing.
I have attached a screen shot of the error(s) when the script is run and also the script itself.
If anyone can solve this, there's 10 points waiting !!
Regards
Simon
RP7410 running HPUX11i
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2008 02:40 AM
10-28-2008 02:40 AM
Re: Help needed with batch password script - urgent(!)
Hi Simon,
It seems the account which is propagating/creating the new users is not valid .If you could post the script it will be better to diagnoise the problem.
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2008 02:47 AM
10-28-2008 02:47 AM
Re: Help needed with batch password script - urgent(!)
One correction to the above reply (becoz I couldn`t get the screen properly at first time)
The error is because you are not specifying the userid for creating the user,that could be the reason it is not creating new user.
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2008 03:12 AM
10-28-2008 03:12 AM
Re: Help needed with batch password script - urgent(!)
max=$(cut -d : -f 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2008 03:16 AM
10-28-2008 03:16 AM
Re: Help needed with batch password script - urgent(!)
findmaxuid()
{
cut -d : -f 3 }
((newuid=$(findmaxuid)+1))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2008 03:28 AM
10-28-2008 03:28 AM
SolutionThe errors seem to indicate problems with parsing the existing contents of the password file. There might be a malformed line in the /etc/passwd file.
Please run "pwck". Some "Login directory not found" errors from system directories are normal, but any other errors might indicate trouble.
By the way, your script is changing /etc/passwd without using the standard lock /etc/ptmp. This is asking for trouble.
Your script should create /etc/ptmp as it starts and remove it after it has appended the new users to the /etc/passwd file. This would ensure that no other tools will modify /etc/passwd while the critical part of the script is running.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2008 03:50 AM
10-28-2008 03:50 AM