Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 06-30-2008, 08:51 AM   #1
LQ Newbie
Registered: Mar 2006
Posts: 16

Rep: Reputation: 0
How to set umask for nologin account ?


I have FC5 and I'm glassfish Java EE Server as user glassd. This user have set up shell to /sbin/nologin. Default umask is 0022, I need this account to have umask 0002.
Unfortunately nologin account do not read /etc/profile where I have added in vain:

if [ $UID -eq 502 ]; then
umask 002

# id glassd
uid=502(glassd) gid=502(glassd)

Is there a way to set up umask to 0002 for nologin account ?

Regards to you all
Old 07-01-2008, 03:50 AM   #2
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
I don't know, but there is most likely a script that is called to startup glassfish. You could add your umask call there. Otherwise, if it is a binary, and there is option to set umask, create a wrapper script which sets umask, and then calls glassfish.

Alternatively, you can use pam to do it:

Last edited by Mr. C.; 07-01-2008 at 04:07 AM.
Old 07-01-2008, 06:53 AM   #3
LQ Newbie
Registered: Mar 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Yes, there is asadmin script to start glassfish, I have added umask 0002 line there and it worked like a charm, thank you.


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
Disabling login access to account, nologin,false or null? humbletech99 Linux - Security 2 03-16-2007 10:36 AM
How to set umask DrRobin22 Linux - General 3 09-13-2006 04:46 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
How to set umask value to 0007 cbekannan Linux - Security 4 01-11-2005 12:15 AM
can you set a default umask for only certain directories? BrianK Linux - General 3 06-14-2004 09:02 PM

All times are GMT -5. The time now is 02:14 PM.

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