.proflie .login question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting .proflie .login question
# 1  
Old 09-09-2004
.proflie .login question

I have been searching how to do this and haven't been able to make it work. When I login to our Unix machine running SunOS 5.8 it automatically starts in csh but I want bash. I don't have access to chsh or password commands so I guess I need to change .profile or .login or .cshrc? Which one and what cammand do I need. I tried putting /bin/bash at the top of .profile but it didn't seem to do anything.

And can anyone explain the diff between .profile and .login? Keep in mind I am a complete noob to Unix. Thanks.

And what other 'cool' things can I do in these files?
# 2  
Old 09-09-2004
Every time you log in, the Unix shell searches your home directory for certain files and executes the commands in them. This allows you to customize your Unix session.

The .cshrc file is executed every time a new C shell is started. The .login is executed after the .cshrc file only when you initially log in. Generally, environment variables should be set in the .login file, and alias and set commands should be in the .cshrc file so that every new copy of the C shell will be able to use them.

The .profile is specific to the bourne and Korn shells and serves the same purpose. Not all shells use the same startup files. For instance, bash uses .bash_profile

Your default shell is set by the unix admin for your site. This is done by setting the 7th field in the /etc/passwd file. If you want your default shell changed then contact the admin and make that request.

You can also change your shell from the command line by typing the shells name. For exampe: ksh (however this only lasts for the duration of your current shells session).
# 3  
Old 09-16-2004
Or, if you don't want to bug your admin/your admin is an arse, you could just add the name of your shell of choice to the end of your .login file so you don't have to waste your time every time you log in switching shells.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

New User Login Exam Question

Hi Folks, I am studying for my 1z0-821 exam and I would like to clarify an answer to the following question : You have a ticket from a new user on the system, indicating that he cannot log in to his account. The information in the ticket gives you both the username and password. The ticket... (2 Replies)
Discussion started by: Ravneet_Pal
2 Replies

2. UNIX for Beginners Questions & Answers

Login cancellation question

Purely out of curiosity, but what would happen in all accounts were locked out from being able to be logged in to?? The root account, on most unix-based systems, is locked by default. What if all other login-enabled accounts were changed to be login-disabled?? If such a thing were possible, would... (1 Reply)
Discussion started by: Huitzilopochtli
1 Replies

3. Shell Programming and Scripting

Question: Automatic launching of a CLI menu upon login (OpenBSD)

Hi all, I am OpenBSD newbie and currently need to manage some OpenBSD firewalls running pf. The OpenBSD version is 4.8 As the other sys admins are not so familiar with OpenBSD, so I have an idea across in my mind on how to minimize the root account usage and other unnecessary access and make... (9 Replies)
Discussion started by: lcxpics
9 Replies

4. Red Hat

Unable to login .Basic question

hi Guys , I m completely new to this environment. I m working in linux gnu operating type. I have root user access to this machine and i have created a user named scott using useradd command then set its password using passwd command. Now my problem is i m not able to loggin using this new... (4 Replies)
Discussion started by: pinga123
4 Replies

5. UNIX for Dummies Questions & Answers

Question on .profile login script

Hey everyone, I'am a little new here and experincing Unix for the first time. I was wondering if somone could help me with this question i'am a bit stuck on Looking at the content of .profile login script The .profile file is in your login directory. It is a startup script file... (1 Reply)
Discussion started by: worldsoutro
1 Replies

6. UNIX for Advanced & Expert Users

Solaris login question, need guru's help

I post this question because it seems that no many people will knows about this. I hope to meet some real guru to help me out. Here is the question: I isntalled solaris 10 on Sun sparc 64 bit machine. I can login as root user through GUI or console. After I created an Oracle user, I only can... (2 Replies)
Discussion started by: duke0001
2 Replies

7. Solaris

Solaris 10 login question, seek guru's help

I post this question because it seems that no many people will knows about this. I hope to meet some real guru to help me out. Here is the question: I isntalled solaris 10 on Sun sparc 64 bit machine. I can login as root user through GUI or console. After I created an Oracle user, I only can... (1 Reply)
Discussion started by: duke0001
1 Replies

8. UNIX for Dummies Questions & Answers

user login script question

hi all, what file(s) needs to be changed and in what way in order to do the following: when user A logs onto freebsd 4.8 automaticaly he needs to start up a script a made that executes: sets ltp0 in polling mode, executes tn5250 keyboard mapping starts tn5250 with the correct parameters. ... (2 Replies)
Discussion started by: termiEEE
2 Replies

9. UNIX for Dummies Questions & Answers

Root login question

Hi all I am administering Linux boxes (running rehat linux 7.3 and 8.0). The other day I tried to ssh from 1 linux box to the other. I was root on the client box. Surprisingly, I could login as root into the host after giving the password!! I am unable to get root login from a SSH client... (2 Replies)
Discussion started by: skotapal
2 Replies

10. UNIX for Dummies Questions & Answers

login question

Why, when you type in an obviously invalid login, does UNIX give you an opportunity to type in a password? Is it a security thing? (1 Reply)
Discussion started by: grassaj
1 Replies
Login or Register to Ask a Question