1837646 Members
3190 Online
110117 Solutions
New Discussion

Re: umask hpux 10.20

 
SOLVED
Go to solution
jim bidebo
Regular Advisor

umask hpux 10.20

i have a 10.20 enviroment, where all the users are running CDE remote. Now i want to change the default umask for all these users without changing their .dtprofiles. (and .profile isnt used)

any ideas?
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: umask hpux 10.20

/etc/profile

Pete

Pete
Alex Glennie
Honored Contributor

Re: umask hpux 10.20

Or ......

try to force .profile to be used under cde.
add umask statement in .profile ...

system wide ;

/usr/dt/app-defaults/C/Dtterm

add *loginShell: True

or per user

vi $HOME/.Xdefaults
Dtterm*loginShell: True

see man dtterm(1)

may assist ?

Dietmar Konermann
Honored Contributor
Solution

Re: umask hpux 10.20

Another idea:

# echo "umask 22" >/etc/dt/config/Xsession.d/set_umask
# chmod 755 /etc/dt/configXsession.d/set_umask

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
jim bidebo
Regular Advisor

Re: umask hpux 10.20

hmm.. see the obvious fault in CDE... no systemwide dtprofile =(

feels lika somekind of workaround to force CDE to use .profile//etc/profile

somehow i get umask 02 as root when i login, but umask inst set in /etc/profile $HOME/.profile or $HOME/.dtprofile
and if i telnet to localhost as user or root i get umask 00
still no umask declared in any of those files.
and /sbin/rc declares umask 022

and on an other system i get 022 as umask, and still no umask declared in any of those files =/
Dietmar Konermann
Honored Contributor

Re: umask hpux 10.20

The Xsession.d directories _are_ the system-wide .dtprofile. All scripts in these directories are sourced just after the local .dtprofile. See /usr/dt/bin/Xsession.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Pete Randall
Outstanding Contributor

Re: umask hpux 10.20

And /etc/profile is invoked anyway.

Pete

Pete
Pete Randall
Outstanding Contributor

Re: umask hpux 10.20

From man profile:

If the file /etc/profile exists, it is executed by the shell for every
user who logs in. The file /etc/profile should be set up to do only
those things that are desirable for every user on the system, or to
set reasonable defaults.


You're of course free to reinvent the wheel if you see fit, but I would hesitate to invest much time in CDE internals when it's already known that HP is abandoning CDE in favor of Gnome. This usage is exactly what /etc/profile is intended for and I really doubt that /etc/profile is going to go away.

Pete

Pete
Dietmar Konermann
Honored Contributor

Re: umask hpux 10.20

Sorry Pete, /etc/profile is NOT sourced when CDE users login using the default setup.

It is correct that sh sources it... but only when started as a login shell, which means its argv[0] starts with '-', e.g. '-sh'.

When you login to CDE then the desktop is started without /etc/profile. When you open a terminal window from here then the shell is started as non-login shell by default. So /etc/profile is never read.

This could be changed using Alex' suggestion above.

Regards...
Dietmar.



"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Pete Randall
Outstanding Contributor

Re: umask hpux 10.20

Good point. Once again I assumed too much - like that they would of course be opening a terminal window.

Pete

Pete
Dietmar Konermann
Honored Contributor

Re: umask hpux 10.20

Hi, Pete! It's me again. :)

I also assume that they open a terminal window, of course. Nevertheless, the profile is NOT read, since the shell is started as NON-login shell.

If you don't believe me, take a vanilla HP-UX with CDE, enter something to /etc/profile and login...

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Pete Randall
Outstanding Contributor

Re: umask hpux 10.20

Hi, Dietmar,

OK, I get it now. Thanks.

Pete

Pete