Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Jul 2014 11:26:22 +0200
From:      Jos Chrispijn <kernel@webrz.net>
To:        "freebsd-questions@FreeBSD.org" <freebsd-questions@FreeBSD.org>
Subject:   Login and auto executes
Message-ID:  <53B9163E.3040406@webrz.net>

next in thread | raw e-mail | index | archive | help
   (1) I have this regular user U1. After I log in to that user account, I
   would like to start a script that does some other commandlines.
   For this purpose I created .bash_profile and .bashrc in the U1 user
   folder, containing a simple test command like 'ls':

   .bashrc
   ls -alt

   In the .profile of the U1 user I put at the last line:
   [ $BASH ] && [ -f ~/.bashrc ] && . ~/.bashrc

   (2) I also tried putting the extra commands in the U1 .profile:

   --- cut ---

   echo '-- UPTIME --'
   uptime
   echo ''
   echo '-- Who is ONLINE --'
   who

   --- cut ---

   but this also is not executed. What do I overlook and/or is there an
   easier way of execting some after-login commands?

   Thanks for your reply,
   Jos Chrispijn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53B9163E.3040406>