- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to prevent a users from using a specific comma...
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
06-29-2005 09:59 PM
06-29-2005 09:59 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 10:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 10:13 PM
06-29-2005 10:13 PM
Re: How to prevent a users from using a specific command
I put
alias tar=''
in the .profile of the users
It works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 10:29 PM
06-29-2005 10:29 PM
Re: How to prevent a users from using a specific command
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 10:46 PM
06-29-2005 10:46 PM
Re: How to prevent a users from using a specific command
alias /sbin/tar='echo "not allowed : tar"'
alias tar='echo "not allowed : tar"'
into the .profile will do the jobs .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 11:35 PM
06-29-2005 11:35 PM
Re: How to prevent a users from using a specific command
alias /sbin/tar='echo "Not allowed : tar"'
# alias /sbin/tar='echo "not allowed : tar"'
sh: /sbin/tar=echo "not allowed : tar": Invalid alias name.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 11:42 PM
06-29-2005 11:42 PM
Re: How to prevent a users from using a specific command
You can try with another way by writing a shell wrapper as,
mv /sbin/tar /sbin/tar.org
#!/bin/ksh
if [[ $LOGNAME = "
then
echo "Permission Denied"
exit 1
else
/sbin/tar.org $@
fi
exit 0
#
save this file as /sbin/tar with bin:bin -r-xr-xr-x permission.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 11:49 PM
06-29-2005 11:49 PM
Re: How to prevent a users from using a specific command
$ tar cvf m.tar file*
not allowed : tar cvf m.tar file1 file2
$ /sbin/tar cvf m.tar file*
not allowed : tar cvf m.tar file1 file2
Anyway, reWriting the command with a script as you said seem to be a good idea. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 01:09 AM
07-05-2005 01:09 AM
Re: How to prevent a users from using a specific command
Nice to work with aliases but ..... it doesn't work in subshell.
I try this following under HP-UX 11.0 & 11i :
alias ls="ls -l"
ls
ksh
ls
The second ls doesn't give the same output !
I try also -x option in alias command ... same effect.
This solution is only valid in the current shell.
Best regards.
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 02:43 AM
07-05-2005 02:43 AM
Re: How to prevent a users from using a specific command
but to really restrict a user and hinder him from issueing certain commands you would need to capture his login in a chroot or jail environment.
Another approach is followed by concepts like SELinux or role based access control (aka RBAC)
If you search www or knoledgebase on these topics with respect to HPUX I'm sure will find many howtos.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 05:17 PM
07-05-2005 05:17 PM