Results 1 to 1 of 1
Hi Guys,
I need to check the umask setting in /root/.bash_profile to make sure that it's set to 077.
I've started writing a bash script with some perl one liners ...
- 07-06-2010 #1Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Checking umask in roots bash_profile
Hi Guys,
I need to check the umask setting in /root/.bash_profile to make sure that it's set to 077.
I've started writing a bash script with some perl one liners in, however it would seem that a straight perl script would be more efficent.
Perl isn't my thing, so any perl guru's out there that could give me a hand?
Basic outline is:
If umask is 077, do nothing
if it's there but different change it (or comment out existing and add a new one).
if it's not there, put one in.
If there was a change pop a comment in at the top of the file (Date - umask altered).
Before anyone asks, no it's not home work!RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.


Reply With Quote