- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to create account with strict permissions
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-17-2007 07:10 AM
01-17-2007 07:10 AM
I have to create a new account for the operators
This account will be generic and will be used by all the operators (this option is instead of creating 30 accounts and than maintain those accounts).
The operators needs to run few basic command and monitor few log files
I want to restrict this account to be able to execute only the command I choose or specify (meaning this account will have strict permissions because of its nature).
Also, I want to be able to monitor who logged in when and from where.
Any ideas???
Thanks
A.k.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2007 07:16 AM
01-17-2007 07:16 AM
Re: how to create account with strict permissions
I am running HPUX 11.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2007 07:25 AM
01-17-2007 07:25 AM
Re: how to create account with strict permissions
If you are not familiar with sudo then do a search.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2007 09:33 AM
01-17-2007 09:33 AM
Re: how to create account with strict permissions
Also check out rsh (restricted shell). 'man 1 sh-posix' and jump ahead to the "rsh Restrictions" subsection.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2007 02:48 PM
01-17-2007 02:48 PM
SolutionBill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2007 02:58 PM
01-17-2007 02:58 PM
Re: how to create account with strict permissions
Check # man script . script enables to keep all command and other history of ther user, only need to put script filename in the .profile of the user. You can also restrict using sudo.
hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 02:30 AM
01-24-2007 02:30 AM
Re: how to create account with strict permissions
Thanks for your answers so far.
I know generic user is a bad idea. However, if I use it with sudo I can log all logins and the commands executed.
I liked a lot Billâ s idea for menu script. However, I will leave it as a last resort(since I will have to write it).
Currently, I am trying to combine a restricted user (rsh) together with sudo
The user shell is rsh , Also I edited PATH in .profile PATH=/usr/xbin .
To /usr/xbin directory I copied only the commands I want this user to be able to use.
In /etc/sudoers I added Cmnd_Alias that includes all the commands I specified in /usr/xbin.
Also, specify that the user can execute those command without password.
In .profile I added aliases that append the command to sudo , so the user even donâ t realize that he is using the commands with sudo
Here are couples of examples for the aliases
alias -x view='/usr/xbin/sudo /usr/xbin/view'
alias -x ls='/usr/xbin/sudo /usr/xbin/ls'
My problem is I am getting this error when trying to execute commands
test101@hpws2:/home/test101# ls rsh: /usr/xbin/sudo: The operation is not allowed in a restricted shell.
Anyone has an idea how to resolve this ?
Thanks,
Amir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 06:31 AM
01-24-2007 06:31 AM
Re: how to create account with strict permissions
chsh user123 /usr/contrib/bin/menu.sh
Make sure that the script is stored with 755 permission, owned by root. Then just add/change the menu items as needed.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 07:05 AM
01-24-2007 07:05 AM
Re: how to create account with strict permissions
Thanks a lot, I think there is a mistake with the attachment.
thanks,
Amir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:25 PM
01-24-2007 01:25 PM
Re: how to create account with strict permissions
I would make one change:
trap "" 2
rather than trap "" 1 2 3. The reason is that the menu should ignore CTRL-C (trap 2) but trap 1 (hangup) should be a normal response so a broken connection will properly terminate the script.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2007 02:52 AM
01-25-2007 02:52 AM
Re: how to create account with strict permissions
Yesterday, when I download your script, I accidentally opened up a different file with a similar name but different content (not sh script).
Anyways, sorry for the confusion and wasting your time over my mistake (If I could I would have compensate you with some extra points).
Your script is a great start, and I am going to start working on this today.
Thanks again !!!!!!!!!
Amir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2007 06:34 AM
01-25-2007 06:34 AM
Re: how to create account with strict permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2007 06:34 AM
01-25-2007 06:34 AM