LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2010, 09:21 PM   #1
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Rep: Reputation: 15
Set default umask for users


Hi,
I think the following code is trying to change the settings inside the file:
CISum=’077’
sed -e "s/002/$CISum/" -e "s/022/$CISum/" /etc/bashrc-preCIS > /etc/bashrc
sed -e "s/002/$CISum/" -e "s/022/$CISum/" /etc/csh.cshrc-preCIS > /etc/csh.cshrc
sed "s/027/$CISum/" /etc/csh.login-preCIS > /etc/csh.login
sed "s/027/$CISum/" /etc/profile-preCIS > /etc/profile
echo "umask $CISum" >> /etc/skel/.bashrc
sed "s/027/077/" /root/.bash_profile-preCIS > /root/.bash_profile

But, what if i only want to check what the settings are inside the file, but does not want any changes to the file. What are the appropriate commands that i can use? Thanks.
 
Old 01-04-2010, 09:44 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,398

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
grep umask filename

will show the cmds in each file
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How Set Default Umask Ani Slackware 5 01-05-2024 01:56 AM
set default umask to a directory or a group luvlinux2009 Linux - Security 4 09-17-2009 08:54 PM
Set default umask for ssh as non-root WorkingClassHero Linux - Security 2 02-19-2008 10:09 AM
can you set a default umask for only certain directories? BrianK Linux - General 3 06-14-2004 09:02 PM
Where to set default file permissions (umask)? tredegar Linux - Newbie 14 01-27-2004 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration