Re: determine when user account created?

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 10/28/04


Date: Wed, 27 Oct 2004 21:07:49 -0400

In article <pan.2004.10.28.00.52.33.589222@yahoo.com>,
 Dave Uhring <daveuhring@yahoo.com> wrote:

> On Wed, 27 Oct 2004 20:29:39 -0400, Barry Margolin wrote:
>
> > Users modify stuff in their home directories all the time. I would
> > never assume that anything in the user's directory has been untouched
> > since their account was created. Why do you expect a symlink from
> > .bash_profile to .bashrc to stay around?
>
> That symlink, if it were even created in the first place, would be quite
> unlikely to be changed. Of course the user can change any file in his
> home directory, but some are unlikely to be changed, ~/.dtprofile as an
> example.

I recall needing to customize that file occasionally.

>
> I am also aware that backup restores or simply copying with tar from one
> disk to a new disk can cause errors there. For instance,
>
> # ls -la .??*
> -rw-r--r-- 1 username sysadmin 1430 Dec 7 2002 .kshrc
>
> Yet this system was installed Aug 23, 2004.

> OTOH, how many hidden files in *your* home directory were added on the
> date your user account was created and still retain the same date/time?

When I was a heavy Unix user, I modified my dot-files pretty often, e.g.
to add directories to my PATH, or change how I customized my prompt, etc.

Maybe there are some that are almost never changed, but off the top of
my head I can't think which ones they would be.

>
> > I'm not even sure why these
> > would be linked together in the first place, since they serve different
> > purposes -- .bash_profile is only for the login shell, while .bashrc is
> > for every shell.
>
> ~/.bashrc is not sourced at login so apparently it is not for *every*
> instance of shell invocation.

OK, every subshell. Still, I don't think they should normally be linked
together -- there's stuff you only need to do at login time, not in
subshells. Often .bash_profile ends with "source .bashrc" to get that
script executed in the login shell as well.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: Chroot environment for ssh
    ... > would like to use SSH for the connections, as opposed to FTP, but I ... > users to be able to log into an interactive shell and I ... > want them to 'escape' out of their home directories. ... directives to chroot the groupand/or userthat are to have ...
    (FreeBSD-Security)
  • Re: determine when user account created?
    ... >> Users modify stuff in their home directories all the time. ... > instance of shell invocation. ... OK, every subshell. ... together -- there's stuff you only need to do at login time, ...
    (comp.unix.solaris)
  • Re: Cant make directory in /home on X86 u3.
    ... You also want an interactive shell with more features than the Bourne ... You almost certainly have disk space available for user home directories ... If you choose to use autofs then specify the location of home directories ...
    (comp.unix.solaris)
  • is /dev/null a vaild Home Directory??
    ... samba file share access. ... Their Shell is /sbin/nologin. ... Currently, all of them have home directories, which I do not want. ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
    (Fedora)