How does UNIX log in a user

How does UNIX log in a user

Post by Keith Boruf » Fri, 26 Jul 1996 04:00:00



Hello,

I am currently trying to learn the sequence of files and scripts used in a typical UNIX login procedure.
There are so many files:
        passwd
        .login
        .cshrc
        csh.login
I don't know where to begin. I am mainly interested how these sequence of files works to set up my enviroment
variables. These variables seem to be scattered throughout the above files and I am chasing my own tail. It is
interesting that certain variables are global throughout my UNIX session regardless of what shell I use after
logging in (exam: from "csh" to "sh", etc.)

If someone could give me an "in depth" example of a login procedure or point me in the proper direction, I
would greatly appreciate it. My own default shell is "tcsh" if this matters, but I am more interested in
learning the procedures that are general for all shells (if this is possible).

I have tried to "RTFM" but can't find any satisfactory info for what I am looking for.

Keith Boruff
Long Island, New York

 
 
 

How does UNIX log in a user

Post by Jonathan Ch » Tue, 30 Jul 1996 04:00:00



>Hello,

>I am currently trying to learn the sequence of files and scripts used in a typic
> al UNIX login procedure.
>There are so many files:
>    passwd
>    .login
>    .cshrc
>    csh.login
>I don't know where to begin.

It differs from shell to shell (and sometimes from system to system),
but for sh(1) like shells, the sequence is:

        /etc/profile
        ~/.profile

For some c-shells:

        /etc/cshrc
        ~/.cshrc
        ~/.login

For some other c-shells, tcsh:

        /etc/csh.cshrc
        /etc/csh.login
        ~/.[t]cshrc
        ~/.login

Check the manual pages for the shell that you are using.

[snip]

Quote:>I have tried to "RTFM" but can't find any satisfactory info for what I am lookin
> g for.

On most systems "man login" will provide you with greater insight.
--
char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}

 
 
 

How does UNIX log in a user

Post by Ronald Fische » Tue, 30 Jul 1996 04:00:00



> If someone could give me an "in depth" example of a login procedure or point me in the proper direction, I
> would greatly appreciate it. My own default shell is "tcsh" if this matters, but I am more interested in
> learning the procedures that are general for all shells (if this is possible).

The files involved upon login via tcsh depend on two things: How tcsh is compiled, and how
you have it configured. As an example, here is the sequence of files executed on login, as
it is done on my system:
        /etc/csh.cshrc
        /etc/csh.login
        ~/.tcshrc
        ~/.login

Further, on every evocation of a subshell, ~/.tcshrc is executed again, unless the subshell
is invoked with the -f switch.

Quote:> I have tried to "RTFM" but can't find any satisfactory info for what I am looking for.

man tcsh

-----------------------------------------------------------
Ronald Otto Valentin Fischer

 
 
 

1. Need HELP to Log User Log-ins form the internet

Hi,

I've setup a FreeBSD 4.1.1-STABLE box to connect a network to the internet
with natd and ipfw firewall.
I've also setup the FreeBSD box to let teleworkers log in with FTP and
telnet.

Now I would like to log FTP and telnet Log-in's from teleworkers who connect
to the machine from the internet.
I woul like to see the time and IP numer from which users Log-in.

I have looked at the /var/log/messages file but this only shows SU Login's.

All help is greatly appriciated!

Luke

2. RS422 anyone??

3. EXCHANGING OPTICAL DISKS : DOS to UNIX / UNIX to DOS

4. how to kill kppp?

5. Communications - Unix to Unix vs Unix to DOS

6. Remote Access to Server

7. ? Unix Shell Syntax to log out user from a shell script ?

8. Multi-Session CD-ROM Driver

9. UNIX commands for a former DOS user

10. Unix Plug-ins?

11. Finding PID to kill the current user logged into UNix

12. Q: How to notify DOS user they have mail on UNIX System

13. How to log users dialing into the Unix server?