LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 10: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, 10:44 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
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 2 11-14-2009 09:49 AM
set default umask to a directory or a group luvlinux2009 Linux - Security 4 09-17-2009 09:54 PM
Set default umask for ssh as non-root WorkingClassHero Linux - Security 2 02-19-2008 11:09 AM
can you set a default umask for only certain directories? BrianK Linux - General 3 06-14-2004 10:02 PM
Where to set default file permissions (umask)? tredegar Linux - Newbie 14 01-27-2004 06:10 PM

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

All times are GMT -5. The time now is 04:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration