Login and auto executes

Jos Chrispijn kernel at webrz.net
Sun Jul 6 09:26:30 UTC 2014


   (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


More information about the freebsd-questions mailing list