LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2007, 11:11 AM   #1
gigaloo15801
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Rep: Reputation: 0
Logon scripts


How can i set up a scripts that will apply to all users at the logon.
I know theres a file called .bashrc in each user s home directory. But that file only affected the user.
 
Old 06-15-2007, 11:14 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

/etc/profile could be used. It's global for all users (I do assume they all have a bash or (pd)ksh shell).

Hope this helps.
 
Old 06-15-2007, 11:26 AM   #3
gigaloo15801
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Original Poster
Rep: Reputation: 0
hurray !! thanks dude. actually the good file is /etc/bashrc but i could never find it without the informations in /etc/profile.
 
Old 06-15-2007, 11:35 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

You're welcome

BTW: /etc/bashrc could be the file you meant, but this file is not always read (depending on how your distro set things up). Most of the time /etc/profile is read during startup. For the details on which files are read take a look at bash' manpage (The INVOCATION section).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
logon scripts with FreeRADIUS kannerke Linux - Wireless Networking 0 09-11-2006 05:19 AM
Have scripts run when you logon BigChuckP Linux - Newbie 4 10-24-2005 08:41 PM
"logon" scripts Ateo Programming 3 09-20-2005 05:51 PM
samba logon scripts carnold Linux - Software 1 06-25-2005 09:47 AM
Logon Scripts TheSockMonster Linux - Networking 2 08-07-2002 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration