The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
global variable not being set robotball Shell Programming and Scripting 5 06-10-2008 06:20 AM
setting a global variable in script arunkumar_mca UNIX for Dummies Questions & Answers 3 10-23-2007 07:46 AM
Managing Users in a Global Environment Randal UNIX for Advanced & Expert Users 0 02-15-2007 03:14 PM
Is there such thing as Global Env Variable for all users? umen UNIX for Dummies Questions & Answers 3 05-11-2006 10:35 PM
Global PATH setting jxh UNIX for Dummies Questions & Answers 5 07-20-2001 05:23 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-12-2002
champion champion is offline
Registered User
  
 

Join Date: Jul 2002
Posts: 64
setting global variable for all users

hi,

i am a newbie unix administrator. i want to set a variable, let's say :

alias cls 'clear'

But i am not going to add this line in the .login file for every home directory of my 500+ users.

pls tell me where should i put this line in, so that all users can use this variable after login.

thank you and urgent
  #2 (permalink)  
Old 08-13-2002
peter.herlihy peter.herlihy is offline
Registered User
  
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
I see you haven't heard back - and there may well (in fact probably is) a 'proper' way to do this.

however if this is urgent....it may be possible to use a simple find -exec to locate all .login or .profile files in the filesystem and append the data.

Not ideal I guess, but it would work if you're root......
  #3 (permalink)  
Old 08-13-2002
isacs isacs is offline
Registered User
  
 

Join Date: Mar 2002
Location: Muenster - Germany
Posts: 22
Just an idea ;-)

Isnīt it posible to create a standard .profile that is stored in a central folder reachable for all users that is included in the .profile for all users?

So at anytime you make changes for all users you only have to change that file.

Iīve seen that on an AIX Box but Iīve no more access to that box so I couldnīt figure out how they exactly implemented this feature.
Probably they just start the standart .profile and included the userīs .profile to make sure the users the users arenīt able to bypass the standart .profile.

Has anybody an idea how to implement this correctly?
  #4 (permalink)  
Old 08-14-2002
peter.herlihy peter.herlihy is offline
Registered User
  
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
Theres a file called /etc/default/login

This will set global variables for all users in addition to their own .profile

This should solve your problem (hopefully).
  #5 (permalink)  
Old 08-15-2002
gelios gelios is offline
Registered User
  
 

Join Date: Aug 2002
Posts: 14
if you use bash, you can add variables to /etc/profile
and they will be available to all logined users.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0