1831336 Members
3101 Online
110024 Solutions
New Discussion

Default user shell

 
SOLVED
Go to solution
Irene Jao
Occasional Advisor

Default user shell

We have created a script that will call veritas netbackup java console, which we called veritas.sh. Given rwxr-xr-x permission.

We included this in /etc/shells

We created a user whose default shell is /fullpath/veritas.sh

Our usual procedure is to open Exceed (for X terminal), then connect thru ssh using putty.

The problem is that after providing username and password the putty session automatically disconnects.

What could be the problem?
15 REPLIES 15
Rajesh D L
Frequent Advisor

Re: Default user shell

Hi,

Change the shell to /usr/bin/sh

regards,
RDL.
Fred Ruffet
Honored Contributor

Re: Default user shell

how does the ssh connection export DISPLAY ? Are you tunneling X through ssh ?

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Ravi_8
Honored Contributor

Re: Default user shell

Hi,

All flavours of UNIX has only sh,ksh,bash,POSIX shell but never heard of the shell you have mentioed(veritas.sh).

Propably veritas.sh is the script which calls netbackup java console. which must be included in user .profile file. No matter what shell the user uses if the script start with #!/sbin/sh
never give up
Irene Jao
Occasional Advisor

Re: Default user shell

We created the script called veritas.sh

What we actually want is for a particular user, say user01, to automatically run the script upon login. We want to prevent him from getting in the prompt.

Yes we are using tunnel.
Sanjay Kumar Suri
Honored Contributor

Re: Default user shell

It seems that /fullpath/veritas.sh is getting executed and the session is getting disconnected.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Irene Jao
Occasional Advisor

Re: Default user shell

By the way, it works when we connect using telnet (using putty). But it doesn't when using ssh.
Irene Jao
Occasional Advisor

Re: Default user shell

Yes that's possible. But how do we address that issue?
Ravi_8
Honored Contributor

Re: Default user shell

Hi,

you need to export the display to user station. In the user .profile enter the command
export DISPLAY=:0.0
/fullpath/veritas.sh

Keep the exceed in passive mode.
never give up
Fred Ruffet
Honored Contributor

Re: Default user shell

could you please put here a copy of your script ? this would help.

Does ssh rely on /etc/shells. Not all program does, and maybe ssh has a more restrictive behaviour.

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Marc Smith
Occasional Advisor

Re: Default user shell

Make sure in the putty config that Connection->SSH->Tunnels
has "Enable X Forwarding" checked. By default, it's not.

I'm also not sure using the script as the shell will allow for the exporting of DISPLAY.

I would use a regular shell for the user, then put a call to the script in the user's .profile, followed by the "exit" command.
Jeroen Peereboom
Honored Contributor

Re: Default user shell

Did you test the veritas script manually?
I mean, give the user a 'normal' shell, and execute veritas.sh. If this works, I guess using the veritas script as login shell forget to set all environment variables needed for the netbackup jave console. I would check this by adding a 'set > $HOME/env.txt' to the veritas script. Also redirect all output and stderr to a file so you can troubleshoot (e.g. command >>logfile 2>&1.

JP
Bill Hassell
Honored Contributor

Re: Default user shell

And finally: as with all shell script, make sure you did not forget the interpreter line at the top of the script:

#!/usr/bin/sh
..rest of your shell script...


Bill Hassell, sysadmin
Dave La Mar
Honored Contributor

Re: Default user shell

Irene -
Here are two scripts we use to access two different modes of Veritas

Script 1
#! /bin/ksh
# 09/25/01 dlamar Set terminals for veritas gui interface
export DISPLAY=cmisdl.corp.gottschalks.com:0.0
/usr/openv/java/jnbSA


Script
#! /bin/ksh
# 09/25/01 dlamar Set terminals for veritas gui interface
export DISPLAY=cmisdl.corp.gottschalks.com:0.0
/usr/openv/netbackup/bin/xbp

You can mainpulate their use however you feel, i.e. call from .profile, .shrc, .kshrc, etc.

Best regards,
dl

"I'm not dumb. I just have a command of thoroughly useless information."
SAHA
Honored Contributor
Solution

Re: Default user shell

check the following:
1. #!/usr/bin/sh or ksh at the begining of veritas.sh
2.export DISPLAY=:0.0
3.Check putty config : Connection->SSH->Tunnels has "Enable X Forwarding" checked
4. give /fullpath/veritas.sh

Thanks,
You must PASS failure on way to success !!!
Howard Yuen
New Member

Re: Default user shell

Irene,

Here is my 2 cents on making the "export DISPLAY" part dynamic. Part of `who -m` will return the current IP of your session. Which you can extract and use it to set your "export DISPLAY" comment. Of course, you will need to "enable X11 tunneling" on your ssh client per many members suggested above.

Thx,
Howard