on 08-14-2014 10:03 AM
Hi Girls and Guys,
I was wondering why we have to execute the change to SIDADM on linux always with "su - SIDADM" ?
What rights and what profile parameters are loaded when changing to SIDADM?
I know the bellow information's. But what is exactly happening when executing su - SIDADM?
DESCRIPTION
Change the effective user id and group id to that of USER.
-, -l, --login
make the shell a login shell
-c, --commmand=COMMAND
pass a single COMMAND to the shell with -c and start a new session for it
-C, --session-command=COMMAND
pass a single COMMAND to the shell with -c and do not create a new session
-f, --fast
pass -f to the shell (for csh or tcsh)
-m, --preserve-environment
do not reset environment variables
-p same as -m
-s, --shell=SHELL
run SHELL if /etc/shells allows it
--help display this help and exit
--version
output version information and exit
A mere - implies -l. If USER not given, assume root.
If you have any idea on what is loaded exactly let me know
Kind Regards
Andrei
Hi Andrei,
why we have to execute the change to SIDADM on linux always with "su - SIDADM" ?
IT is not required always. We normally do su - sidadm , becoz we login with our own id and then we perform switch user to sidadm or orasid
You can always make a direct login with sidadm user if you have the password.
When you login all the environment variables for this user gets loaded and shell prompt is set based on value in profile.
Regards,
Deepak Kori
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kori,
Thank you for the answer but if I log-in with the root and then make an "su SIDADM" and try to execute R3trans -d it does not work. It gibes the bellow error. So what is exactly loaded when executing su - sidadm ?
serverSID:~ # su SIDadm
serverSID:t30adm 51> R3trans -d
This is R3trans version 6.24 (release 741 - 27.03.14 - 20:14:03 ).
unicode enabled version 2EETW152 Cannot open file "trans.log". : Permission denied
R3trans finished (0012).
Kind Regards,
Andrei Stefanescu
Hi Andrei,
when you do "su sidadm", you basically become sidadm but without sidadm's environment, and without changing to sidadm's home directory. You stay in root's home directory where sidadm has no write permisssions - that's why you get a "permission denied" error.
When you do "su - sidadm", the login process looks up sidadm's home directory and shell in /etc/passwd. Usually this is /home/sidadm and C shell (csh). The C shell initialization files are .login and .cshrc under /home/sidadm. These files load other environment files such as .sapenv.csh and .dbenv.csh. You can see these "hidden" files with "ls -la /home/sidadm".
Best Regards,
Henning Sackewitz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.