![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| How to get time since last boot? | siegfried | High Level Programming | 3 | 08-17-2006 04:40 AM |
| Defining Variables | sailorliones | UNIX for Dummies Questions & Answers | 4 | 07-21-2006 03:09 PM |
| Reduce boot-time delay on FreeBSD? | DownSouthMoe | BSD | 1 | 03-28-2004 03:07 AM |
| start a process at boot up time | vtran4270 | UNIX for Advanced & Expert Users | 1 | 12-08-2002 07:31 PM |
| Disable routed daemon at boot time???? | rrivas | UNIX for Dummies Questions & Answers | 2 | 04-09-2002 11:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I'm looking for advice on where is the best place on Solaris to put a script that will setup system vairables prior to any users loging in. I've tried /etc/rc3.d without much success as the variables do not appear in the output from an env command. I want the system to have these variables set without any user intervention. Thanx. |
|
||||
|
From the man pages:
The basic environment is initialized to: HOME=your-login-directory LOGNAME=your-login-name PATH=/usr/bin: SHELL=last-field-of-passwd-entry MAIL=/var/mail/your-login-name TZ=timezone-specification For Bourne shell and Korn shell logins, the shell executes /etc/profile and $HOME/.profile, if it exists. For C shell logins, the shell executes /etc/.login, $HOME/.cshrc, and $HOME/.login. The default /etc/profile and /etc/.login files check quotas (see quota(1M)), print /etc/motd, and check for mail. None of the messages are printed if the file $HOME/.hushlogin exists. The name of the command interpreter is set to - (dash), followed by the last com- ponent of the interpreter's path name, for example, -sh. Any system wide variables you want all 'users' to have should be placed in the /etc/profile and/or /etc/.login. Any 'user' specific (all Oracle DBA) should be set up on the individual profile or login in the home directory. |
|
||||
|
Which version of Solaris? How are you logining in - console - telnet - rsh/rlogin - ssh ? What is the shell being used?
Please give an example of one of the variables attempting to be set (copy from the /etc/profile as it may just be a typo) |
|
||||
|
Code as follows from /etc/profiles
#ident "@(#)profile 1.17 95/03/28 SMI" /* SVr4.0 1.3 */ # The profile that all logins get before using their own .profile. trap "" 2 3 export LOGNAME PATH if [ "$TERM" = "" ] then if /bin/i386 then TERM=AT386 else TERM=sun fi export TERM fi # Login and -su shells get /etc/profile services. # -rsh is given its environment in its .profile. case "$0" in -sh | -ksh | -jsh) if [ ! -f .hushlogin ] then /usr/sbin/quota # Allow the user to break the Message-Of-The-Day only. trap "trap '' 2" 2 /bin/cat -s /etc/motd trap "" 2 /bin/mail -E case $? in 0) echo "You have new mail." ;; 2) echo "You have mail." ;; esac fi esac umask 022 trap 2 3 CLASSPATH=/ianf export CLASSPATH I'm using Solaris 2.6 I'm loging in on telnet and console. Thanx. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|