- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- new users script
Operating System - HP-UX
1754813
Members
3873
Online
108825
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
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
09-25-2003 02:50 AM
09-25-2003 02:50 AM
I am writing a script that will add 50 new users but I am using a secure system and when I go to modidy the password I get â password cannot be changed. Reason: Cannot access protected password entry.â I am simply adding the user to /etc/passwd. What else do I need to do? The script works great but how do I add the user to the protected password database? also, can I script in the password? This is part of the script:
CT=104
for i in for i in `ls *.prt`
do
NEWUSER="`echo ${i} |sed -e 's/..\.prt//'`"
echo "$NEWUSER:*:$CT:104:,,,:/ftp/ftproot/./$NEWUSER:/usr/bin/false" >> /etc/passwd
CT=`expr $CT + 1`
done
thanks in advance!
Ma
CT=104
for i in for i in `ls *.prt`
do
NEWUSER="`echo ${i} |sed -e 's/..\.prt//'`"
echo "$NEWUSER:*:$CT:104:,,,:/ftp/ftproot/./$NEWUSER:/usr/bin/false" >> /etc/passwd
CT=`expr $CT + 1`
done
thanks in advance!
Ma
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 02:53 AM
09-25-2003 02:53 AM
Solution
You really should be using the 'useradd' command to do this. All the users that you add must also be added to the /tcb/files/auth/ structure as well. I would not want to try to create each users entry in that structure manually.
# man useradd
for more information.
# man useradd
for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 03:05 AM
09-25-2003 03:05 AM
Re: new users script
Matthew,
As Patrick pointed out, useradd is the right way to add new users. Create a wrapper script with useradd.
useradd -u -m .
man useradd for more details.
HTH,
Umapathy
As Patrick pointed out, useradd is the right way to add new users. Create a wrapper script with useradd.
useradd -u
man useradd for more details.
HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 04:45 AM
09-25-2003 04:45 AM
Re: new users script
Hi,
I believe when you mention "secure system", you meant "trusted system". For trusted system, the protected password entry resides in /tcb/auth/files/...
Thus, any script that modifies /etc/passwd will need to modify the equivalent userid file in /tcb/auth/files/...
I do agree with the rest however that using robust system commands is cleanest.
Hope this helps. Regards.
Steven Sim Kok Leong
I believe when you mention "secure system", you meant "trusted system". For trusted system, the protected password entry resides in /tcb/auth/files/...
Thus, any script that modifies /etc/passwd will need to modify the equivalent userid file in /tcb/auth/files/...
I do agree with the rest however that using robust system commands is cleanest.
Hope this helps. Regards.
Steven Sim Kok Leong
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP