- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- useradd script for support
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
09-25-2008 09:19 AM
09-25-2008 09:19 AM
useradd script for support
The support people where I work need to have root access to create/modify/disable users but, we don't want to give them shell access.
So, I have the menu set up but, I am having issues with the script that the menu would call.
Does anyone have something similar to what I am looking for so I don't have to "reinvent the wheel"? I just need something that will ask for the user information (login, name, group) and create the user (home dir, passwd entry, etc...) while checking to make sure that the login does not already exist.
Thanks for your help!
p.s. the menu is a shell script. I would like the useradd script to also be in shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 09:28 AM
09-25-2008 09:28 AM
Re: useradd script for support
You could create a restricted shh session for the support desk, like the old sam -r (restricted) version.
From docs.hp.com
If you need to give limited superuser access to a nonsuperuser, you can activate the Restricted SMH Builder. Using the Restricted SMH Builder, you can enable or disable selected SMH areas for the user. To activate the Restricted SMH Builder, enter:
# smh -r
When users with restricted access execute SMH, they will have superuser status in the defined areas and will only see those SMH areas in the menu. All other areas of SMH will be hidden from the user. When users without access permissions execute SMH, they will receive an error message stating they must be superuser.
You can also add more applications to SMH and set them up for restricted access.
http://docs.hp.com/en/5992-3387/ch02s11.html
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 09:34 AM
09-25-2008 09:34 AM
Re: useradd script for support
another option is the RBAC HP-UX Role-Based Access Control. Have a look at the info in below link. Software is available for 11i v2 + v3.
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=AccessControl
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 09:41 AM
09-25-2008 09:41 AM
Re: useradd script for support
Any other ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 09:47 AM
09-25-2008 09:47 AM
Re: useradd script for support
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 10:02 AM
09-25-2008 10:02 AM
Re: useradd script for support
Simple to do.
The script is the part need to concentrate on.
1) restrict the username that the helpdesk can change passwords for. e.g. root, admin people, and application accounts.
2) every activity should create an audit log, not just for the auditors but to audit who did what and when just in case an issue comes up.
Here is the logic.
Enter username:
if $username = root ||admins ||applications then exit
Can also use a resticted list, e.g. if attempting to change password for username in list then exit.
Pretty simple.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 10:07 AM
09-25-2008 10:07 AM
Re: useradd script for support
I just need a script that reads in the login, name and group and runs either useradd, userdel or usermod depending on which menu item they picked.
They already have access to sam (restricted) and don't like this option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 10:35 AM
09-25-2008 10:35 AM
Re: useradd script for support
If 'sudo', restricted SAM/SMH or RBAC aren't viable options for you, then your choice may be (forbid I mention this!) a 'setuid' C-wrapper for your shell script.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 08:37 PM
09-25-2008 08:37 PM
Re: useradd script for support
Take a look at my Perl script:
http://www.circlingcycle.com.au/Unix-sources/add-batch-Unix-accounts.pl.txt
Add options for userdel or usermod and
you can do it easily.
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2008 05:39 AM
10-13-2008 05:39 AM