Operating System - HP-UX
1837800 Members
8900 Online
110120 Solutions
New Discussion

Problem modify user (env and .profile)

 
SOLVED
Go to solution
Eli Daniel
Super Advisor

Problem modify user (env and .profile)

good morning,
need help
I am creating a new user in HP-UX and must have the same environment variables of another user
nose and add
dbeadm user must have the same user ENV pbeadm
new user: dbeadm
[1] % env
HOME=/home/dbeadm
PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/sas/bin:/opt/wbem/bin:/opt/wbem/sbin:/usr/bin/X11:/opt/resmon/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/graphics/common/bin:/opt/prm/bin:/opt/sfm/bin:/opt/hpsmh/bin:/opt/upgrade/bin:/opt/wlm/bin:/opt/sec_mgmt/bastille/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/thunderbird:/opt/gwlm/bin:/usr/contrib/bin/X11
LOGNAME=dbeadm
SHELL=/bin/csh
TERM=xterm
COLUMNS=158
LINES=61
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/VRTS/vxfs4.1/man:/opt/ldapux/share/man:/opt/ldapux/ypldapd/man:/opt/ipf/man:/opt/cifsclient/share/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/wbem/share/man:/opt/amgr/man:/opt/amgr/man/%L:/usr/dt/share/man:/opt/samba/man:/opt/samba/WTEC_Support_Tools/man:/opt/resmon/share/man/%L:/opt/resmon/share/man:/opt/perf/man/%L:/opt/perf/man:/opt/VRTS/man:/opt/graphics/common/man:/opt/prm/man/%L:/opt/prm/man:/opt/sfmdb/pgsql/man:/opt/sfm/share/man:/opt/wlm/share/man/%L:/opt/wlm/share/man:/opt/sec_mgmt/share/man:/opt/drd/share/man/%L:/opt/drd/share/man:/opt/dsau/man:/opt/gnome/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/perl_32/man:/opt/perl_64/man:/opt/sec_mgmt/share/man/%L:/opt/ssh/share/man:/opt/swa/share/man/%L:/opt/swa/share/man:/opt/gwlm/man/%L:/opt/gwlm/man:/opt/EMCpower/share:/opt/openssl/fips/0.9.7/man
TZ=SAT4:30
**********************************
current user: pbeadm

SAPL903:pbeadm 25> env
HOME=/home/dbeadm
PATH=/oracle/DBE/102_64/bin:/opt/java1.4/bin:.:/home/pbeadm:/usr/sap/DBE/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/sas/bin:/usr/bin/X11:/opt/resmon/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/prm/bin:/opt/sfm/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/mozilla:/opt/perl/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/hpvm/bin:/opt/hpnpl//bin:/opt/ignite/bin:/opt/gvsd/bin
LOGNAME=pbeadm
SHELL=/bin/csh
TERM=xterm
COLUMNS=158
LINES=61
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/VRTS/vxfs4.1/man:/opt/ldapux/share/man:/opt/ldapux/ypldapd/man:/opt/ipf/man:/opt/cifsclient/share/man:/usr/dt/share/man:/opt/samba/man:/opt/samba/WTEC_Support_Tools/man:/opt/resmon/share/man/%L:/opt/perf/man/%L:/opt/perf/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/wbem/share/man:/opt/VRTS/man:/opt/graphics/common/man:/opt/prm/man/%L:/opt/prm/man:/opt/sfmdb/pgsql/man:/opt/sfm/share/man:/opt/sec_mgmt/share/man:/opt/dsau/man:/opt/gnome/man:/opt/perl/man:/opt/sec_mgmt/share/man/%L:/opt/ssh/share/man:/opt/gwlm/man/%L:/opt/gwlm/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/hpvm/man/%L:/opt/hpnpl//man:/opt/resmon/share/man:/opt/openssl/fips/0.9.7/man:/opt/hpvm/share/man/%L
TZ=SAT4:30
SAPSYSTEMNAME=DBE
DIR_LIBRARY=/usr/sap/DBE/SYS/exe/run
SHLIB_PATH=/usr/sap/DBE/SYS/exe/run:/oracle/client/10x_64/instantclient
JAVA_HOME=/opt/java1.4
THREAD=NOPS
dbms_type=ORA
dbs_ora_tnsname=DBE
dbs_ora_schema=SAPSR3
ORACLE_SID=PBE
DB_SID=PBE
ORACLE_BASE=/oracle
SECUDIR=/usr/sap/DBE/DVEBMGS01/sec
TNS_ADMIN=/usr/sap/DBE/SYS/profile/oracle
ORACLE_HOME=/oracle/DBE/102_64
NLS_LANG=AMERICAN_AMERICA.UTF8
SAPDATA_HOME=/oracle/DPBE
3 REPLIES 3
Steven Schweda
Honored Contributor
Solution

Re: Problem modify user (env and .profile)

> dbeadm user must have the same user ENV
> pbeadm

So, what's your question?

> SHELL=/bin/csh

I thought that the C shell used "~/.cshrc"
and/or "~/.login", not "~/.profile". Are you
looking at the right file(s)?
James R. Ferguson
Acclaimed Contributor

Re: Problem modify user (env and .profile)

Hi:

So, declare and export (or 'setenv' for that brain-dead C-shell) the non-standard variables you need in the new user's login file. This is '${HOME}/.profile' for the POSIX or Korn shell. Since you appear to be using the scummy C-shell, the login file to modify is the '${HOME}/.cshrc' and '${HOME}/.login' files.

When done, logout and login to the new user and compare the results with your template user.

Regards!

...JRF...
Eli Daniel
Super Advisor

Re: Problem modify user (env and .profile)

Thanks