How can I setup my system to make a command alias for all users?
Anyone know how you create a command alias for all users so they can empty a temporary directory.
|
Well 'empty a temporary directory' is a little vague but assuming your users have bash as their shell put an alias in to /etc/bashrc. Though on SuSE systems it's called /etc/bash.bashrc and if you read the comments at the top it tells you not to put your own stuff in that file but to put it in /etc/bash.bashrc.local
If you don't know how to do bash aliases then Code:
alias foo='some bunch of commands' |
If you are talking about /tmp directory - that's probably not the best idea as one user will be able to delete some temp files that another user's application is using at that time.
|
Quote:
drwxrwxrwt 14 root root 4096 2009-02-04 20:00 /tmp/ the significant part being that t which represents the sticky bit that allows any user to create a file in /tmp but only to delete files which they own. |
Quote:
I'm aware of all of it. I wanted to discourage the OP from tampering with /tmp (eg. by removing the sticky bit) to enable users to empty it (ie. delete its contents) |
All times are GMT -5. The time now is 01:57 PM. |