Login Shell


 
Thread Tools Search this Thread
Operating Systems HP-UX Login Shell
# 1  
Old 03-30-2009
Login Shell

Hi all

I would like to know what my current shell is? i.e The shell at the time of login.

I knw the below commands

echo $SHELL


but this is not doing the job..


Any other way to find it?

What is the below line doin?

ps -ef | grep $PPID

Will this fetchn the corret shell the user is in?
# 2  
Old 03-30-2009
grep <youraccount> /etc/passwd...
# 3  
Old 03-30-2009
Hi Vbe

Yes, this is possible. But what in case the user is in a ldap directory?
# 4  
Old 03-30-2009
Quote:
cho $SHELL
but this is not doing the job..
What does this return?
# 5  
Old 03-30-2009
maybe :
Code:
 ps -ef|grep "$$"|grep -ve grep -e ps

# 6  
Old 03-30-2009
Code:
ps -p$$

# 7  
Old 03-30-2009
Quite right radoulov!
But I was expecting someone coming up with a "killer" sed stuff, not something that easySmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script as login shell (passing args to login shell)

Hello all, for security reasons my compagny imposes that my script be launch remotly via ssh under the users login shell. So serverA launches the ssh command to serverB which has a local user with my script as a login shell. Local script works like a charm on his own. serverB$ grep... (20 Replies)
Discussion started by: maverick72
20 Replies

2. UNIX for Dummies Questions & Answers

Which of the following command displays your login shell in bash shell?

Options:: A)$shell B)echo $ bash C)echo $ O D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies

3. UNIX for Dummies Questions & Answers

What is login and interactive shell?

Hi Guys, Excuse if am asking silly Que ... :rolleyes: Please explain me whats difference between login and interactive shell in Linux .. Have googled but still in doubt .. :confused: --Shirish Shukla (4 Replies)
Discussion started by: Shirishlnx
4 Replies

4. Shell Programming and Scripting

Login with Shell Script.

Dear All, I need to create a shell script which will login to a unix system with user root. I also need to supply the password for root through script only instead of entering it manually. After i am logged in to the system i need to excute all the necessary commands. so far i have done... (7 Replies)
Discussion started by: Siddheshk
7 Replies

5. Linux

How to Start a Shell as Login shell instead of ordinary shell

Hi I tried with bash --login option. but the output is siva:~$ bash --login siva:~$ is there any way to make the shell ask for user id and password ( and login as different user instead of using sudo / su ) Thx in advance Siva (3 Replies)
Discussion started by: Sivaswami
3 Replies

6. Shell Programming and Scripting

login from a shell script?????

Any help on this ..... its a bit urgent !!!! Hi Can anybody provide info about the following??? i want to issue su (switch user) command from within a shell script how to take the password without user intervention from the shell script only???? i.e using apssword which is already... (2 Replies)
Discussion started by: skyineyes
2 Replies

7. UNIX for Dummies Questions & Answers

Can't login as SU anymore - SU: NO SHELL

the root shell has been changed in the file /etc/passwd, basically pointing to an incorrect directory. So now every time we login as 'su' I get the message 'su: no shell' so we can't login as superuser. Is there an easy way to rectify this? please use step by step instructions/commands - I... (4 Replies)
Discussion started by: homechoice
4 Replies

8. Solaris

How to get bash to be the login shell?

Is there a way to edit a .profile file that would let a user have bash as their login shell? We tried adding: exec /bin/bash --login to the .profile, but this produced an endless loop and we could not login using that account. Thanks! Aaron (8 Replies)
Discussion started by: amheck
8 Replies

9. HP-UX

cannot login after changing login shell

Hello Everyone, I am a newbie in unix. I was practicing shell scripts on hp unix machine. I changed my current login shell (Korn) to Bourne shell giving the following command. $ chsh username /usr/bash I am using secure shell client for accessing the hp ux server. After which i... (4 Replies)
Discussion started by: hardesh
4 Replies

10. UNIX for Dummies Questions & Answers

Standard login shell

Hello By default for root the login shell is /bin/sh. In the file /etc/passwd I changed it to /bin/bash. (/bin/bash does exists!) After I logged out and in again I still have /bin/sh as the shell and not /bin/bash. Are the more files to be edited? I am using SCO-Unix. I am thankfull for any... (4 Replies)
Discussion started by: Fwurm
4 Replies
Login or Register to Ask a Question