1832490 Members
3520 Online
110043 Solutions
New Discussion

.profile and su - issues

 
SOLVED
Go to solution
KPS
Super Advisor

.profile and su - issues

When I su - another user, I'm getting the following message when I become that message:

${HOME:-.}/.profile[55]: syntax error: `newline or ;' unexpected

The su - does work however, despite that message.

On line [55] of the appuser .profile we have the following:

set -A whoAmI $(who am i)

whoAmI gets associated to values later in the .profile in case you needed to know.

Would anyone have any ideas why we're getting the above message?

7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: .profile and su - issues

Ken:

In isolation, there doesn't appear to be anything wrong with the 'set' statement. Post your complete profile. I suspect that your error lies above line-55.

Regards!

...JRF...
Devender Khatana
Honored Contributor

Re: .profile and su - issues

Hi,

Change the line to

set -A whoAmI $(whoami)

Or

set whoAmI $(whoami)

If problem persists attach .profile.

HTH,
Devender

Impossible itself mentions "I m possible"
KPS
Super Advisor

Re: .profile and su - issues

Tried both and neither worked. I just recently added the part of the .profile that talks about Shadowing users and onward today to implement some logging for users that become this
James R. Ferguson
Acclaimed Contributor
Solution

Re: .profile and su - issues

Hi Ken:

I believe that the comment on the line-58 spills onto a new line rather than continuing to the end. Change that and try.

Regards!

...JRF...
KPS
Super Advisor

Re: .profile and su - issues

That was it. Thanks very much everyone..
KPS
Super Advisor

Re: .profile and su - issues

.
Roland Piette
Regular Advisor

Re: .profile and su - issues

Hi Ken

I understand that for reading it is more fun to have you case line (line-58) in two lines.

If you would keep it try to insert a \ (backslack) before the new line char.

case ${whoAmI[0]} in \
cpcmep|cpcfop|cpcolp|devwm|tstwm|trnwm|root) : ;; # Nothing for us to do

Regards
Roland