How to get bash to be the login shell?


 
Thread Tools Search this Thread
Operating Systems Solaris How to get bash to be the login shell?
# 1  
Old 03-10-2006
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
# 2  
Old 03-10-2006
use the usermod command to modify the user login shell like this

# usermod -s /bin/bash

which usually changes the usr's login shell and set-up the new .bashrc profile for the new login shell
# 3  
Old 03-10-2006
Thanks! So put that in the .profile statement, without the "#" sign in front? Or is that needed?
# 4  
Old 03-10-2006
Don't put that in the .profile file. Just run that command once as the user. The '#' character is just the command prompt, you don't actually type that character in.
# 5  
Old 03-10-2006
Oh, ok, I was hoping to have something to put in the profile so we could avoid running that command everytime. Smilie
# 6  
Old 03-10-2006
Quote:
Originally Posted by amheck
Oh, ok, I was hoping to have something to put in the profile so we could avoid running that command everytime. Smilie
I'm not sure I understand you. You only have to run it once.
# 7  
Old 03-10-2006
And then it remembers to use bash as the shell everytime you login? I guess maybe I'm confused, too. Looking for something this user can put in their .profile statement so they will have bash as their shell everytime they login.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Run automated bash commands from sh login shell

I use plink.exe to automate remote commands that return data to Windows machines. This works well on newer servers running Red Hat since the commands were developed for bash and the designated user's login shell is bash. I need to also support older servers which are running Solaris 10 but the... (5 Replies)
Discussion started by: randman1
5 Replies

2. Shell Programming and Scripting

How to do user-preset login to Bash shell then automate path modification?

How do a user login with full user-environment preset to Bash shell then automatically do path modification with few script codes, either on command-line or put it in a script file. what i tried: bash --login -c PATH="/ANewPath:${PATH}" bash --login -c 'PATH="/ANewPath:${PATH}"; export PATH'... (2 Replies)
Discussion started by: abdulbadii
2 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Login PID in sh/bash different

In bourne shell the PID generated for the command "ps" matches my login id PID in the command "who -Hu" but in bash/linux the PID generated with the same commands are different . Why so? (2 Replies)
Discussion started by: asd78in
2 Replies

5. 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

6. Shell Programming and Scripting

Help with Unix bash shell script login

Hi, I am a complete Unix novice and need some help with creating a login shell script. I have created a file with user details i.e. PIN, name etc and require help in recalling the specified details from the file and being prompted for a password on login. Any help would be very much appreciated.... (0 Replies)
Discussion started by: tdsrogers
0 Replies

7. Shell Programming and Scripting

BASH ssh login

Ok, there's been a good number of posts about this, but here goes. I want a script to log in to a system via ssh without using keys. This will be used to log in to Cisco IOS devices. I have tried the following, but could not get it to work: SSH login expect shell script to supply username and... (1 Reply)
Discussion started by: mike909
1 Replies

8. Shell Programming and Scripting

Automatically change to Bash shell after login

Hi men, I think this must be a very common job. "How could to Automatically change to Bash shell after login and then jail user can only using this shell". I want monitor user works.However it just only effect on Bash shell. Consequently if the user change the shell it will be worthless. ... (4 Replies)
Discussion started by: tien86
4 Replies

9. Shell Programming and Scripting

bash script for ssh login-

hi. I need a bash script which can login to an other mashin via SSH and then run some commands and then return the result to my mashine. I dont know where to begin, I think first I will need a ssh connection, dont know how to make it, then , do I need a ftp connection between the 2 mashins to... (5 Replies)
Discussion started by: big_pil
5 Replies

10. 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
Login or Register to Ask a Question