- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- CDE and newgrp command conflict
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 12:51 AM
03-01-2004 12:51 AM
CDE and newgrp command conflict
We have set up a procedure that checks a user. Is the cluster-package active, etc, etc. If not the user gets kicked out.
Now when this is true the user is getting a newgrp to the application group and it is switching $HOME to the package location.
Now using a standard VT emulation to login, there is no problem. Ones I try this loging in in CDE (DTSOURCEPROFILE=TRUE), the user gets kicked out, right after entering it's password.
If I comment the newgrp command that is set in the .profile of the user, the user does login correct, but of course with the wrong primary group.
Does anyone know of this problem and if there is a patch or something for it?
Summary : CDE does not accept newgrp in .profile when DTSOURCEPROFILE=TRUE in the .dtprofile. Solution?
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 02:21 AM
03-01-2004 02:21 AM
Re: CDE and newgrp command conflict
I would look at ~user/.dt/dt/startlog and errorlog files to more information. I am not sure if this is a problem with CDE and newgrp but you can find it out in those logs.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 02:24 AM
03-01-2004 02:24 AM
Re: CDE and newgrp command conflict
There is a type in my previous message. There is an extra dt in my ~user/.dt/dt/startlog. It is to be read as ~user/.dt/startlog
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 02:26 AM
03-01-2004 02:26 AM
Re: CDE and newgrp command conflict
I know for sure it is. The last line says :
X connection to putd1905.intern.axa.nl:0.0 broken (explicit kill or server shutdown).
This is only when I have the newgrp command uncommented. when I comment the newgrp command I normaly log in.
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 02:42 AM
03-01-2004 02:42 AM
Re: CDE and newgrp command conflict
newgrp
See if you get any pointers out of it.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 03:08 AM
03-01-2004 03:08 AM
Re: CDE and newgrp command conflict
is it sufficient to have the newgrp command in .kshrc? Can you try that?
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 04:35 AM
03-01-2004 04:35 AM
Re: CDE and newgrp command conflict
Sri > The error is not in newgrp, it does not even show any info when usinf the i/o redirection.
Jeroen > It does not work, how can I get a dtterm to read the .kshrc ? It does read the .profile right now (dtterm -ls).
A related question :
- I managed to find out that "who am i"does not show anything if you run the .profile during CDE login, but it does during startup of a dtterm. Using test gives me a very anoying invalid test-argument, which I did not expect in this situation :
unset who
who=`/usr/bin/who am i`
if [ -n "$who" ]
then
if [ -n "$newgrp" ]
then
newgrp $newgrp
fi
fi
The error is :
${HOME:-.}/.profile[35]: newgrp: parameter not set
This is why I had the test in, right? It's quoted, so I don't see the problem?
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 04:36 AM
03-01-2004 04:36 AM
Re: CDE and newgrp command conflict
ln -s /etc/group /etc/logingroup
and now, all users are automatically members of their groups...no newgrp required.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 04:47 AM
03-01-2004 04:47 AM
Re: CDE and newgrp command conflict
The very important thing is that I need to change my prim-group.
whenever a user creates a file the file gets owned by it's prim-group and not by a randow other group.
Is there a different solution for this issue (maybe a new command that I can run?)
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 04:48 AM
03-01-2004 04:48 AM
Re: CDE and newgrp command conflict
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 06:11 AM
03-01-2004 06:11 AM
Re: CDE and newgrp command conflict
The issue is that i do not know a comand that changes your primary group in case of creating files, without the anoying habbits of newgrp that is giving you a new shell.
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 06:18 AM
03-01-2004 06:18 AM
Re: CDE and newgrp command conflict
newgrp - appgroup
As mentioned, this must be the last command in your script. The current shell and script will be replaced by the newgrp shell.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 06:44 AM
03-01-2004 06:44 AM
Re: CDE and newgrp command conflict
To get around with the problem, you can check if the current session is with desktop or not using the "DT" variable. Look at .dtprofile for more information.
Also, if you have to put newgrp in your startup, then make sure you *do not* use '-' in your newgrp command. This is because the new shell will startup as if you had just logged in which means, running .profile again and again causing it to go into loop. You may be better off with a new subshell rather than this condition. It's fine if it is a standalone script though.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 05:36 AM
03-02-2004 05:36 AM
Re: CDE and newgrp command conflict
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 09:14 PM
03-02-2004 09:14 PM
Re: CDE and newgrp command conflict
I found my lost password back again :)
In short we can say.
There is no alternative for changing the primary group other then newgrp, unfortunetly this command can never be executed in a .profile when using CDE and DTSOURCEPROFILE=TRUE
Unfortunetly there is a handmade script needed to adapt this. My script is as following :
# cat ~/.profile
# @(#) $Revision: 72.2 $
# User .profile file (/usr/bin/ksh initialization).
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH
export PATH
# Set the vi options
set -o vi
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
# Start in the new primary group, but only when a term is invoked.
unset who
who=`/usr/bin/who am i`
if [ -n "$who" ]
then
newgrp etlogrpo
fi