User switching without carrying over LC_CTYPE env variable
I am using Solaris8, userA's shell '/usr/ace/prog/sdshell', AppuserB's shell '/bin/ksh'.
I am switching from userA's account to AppuserB's using 'sudo /usr/bin/su - AppuserB'. This is not bringing any of 'userA' environment variables except 'LC_CTYPE' over to 'AppuserB' account. What tells sudo to bring this variable over? How can I prevent this? Is there a way to make sure none of userA's env variables get carried over to userB's including these system variables !!?
Last edited by kchinnam; 04-24-2013 at 04:39 PM..
Reason: correction to example
Hello everyone,
I need to make a OS full backup. I am using the vdump command but first, I must to switch to the single-user mode.
I am working on a Compaq Tru64 Unix V4.0G.
Please, could somebody tell me which is/are the commands to do it?
I appreciate your help
Gastón (1 Reply)
I am writing a script that has some tasks that must be run as root, then set of tasks to be run as normal user, then again as root.
is there a way to switch between users in a script?
any other alternatives?
thx (3 Replies)
Good day Guys!!!
I am currently making a script in AIX, the script runs a SAS job, the owner of the script is the root, but the SAS jobs cannot be run by the root, as it should be run by a user 'sasia'. But inside the script, root creates a logfile, so what I need is just to su to sasia for the... (3 Replies)
Hi,
what is the use of the double quotes and !! in the following code segment:
su - user1 << ""!! > /dev/null 2>&1
echo "welcome user1"
EOF
!!
also what is the difference between below:
su - user1 << ""!! > /dev/null 2>&1 and
su - $USER << ""!!!> /dev/null 2>&1.
Note: $USER =... (1 Reply)
Hi,
what is the use of the double quotes and !! in the following code segment:
su - user1 << ""!! > /dev/null 2>&1
echo "welcome user1"
EOF
!!
also what is the difference between below:
su - user1 << ""!! > /dev/null 2>&1 and
su - $USER << ""!!!> /dev/null 2>&1.
Note: $USER =... (2 Replies)
I need to do a switch user in an automated mode and do a ftp using that switched id.
Scenario:
initial login xx.
switch to user-yy without manually entering the password.
ftp some files from user yy to another user zz - automated mode.
Can any unix experts can help me for my above query? (1 Reply)
I need to do a switch user in an automated mode and do a ftp using that switched id.
Scenario:
initial login xx.
switch to user-yy without manually entering the password.
ftp some files from user yy to another user zz - automated mode.
Can any unix experts can help me for my above query? (9 Replies)
(Above from Apache docs).
On my system, using:
SetEnvIf User-Agent Mozilla IsBad=1
Order allow,deny
Allow from all
Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user.
How to fix this? (1 Reply)
Hi all, I have a script that I will need to run occasionally to stop my db2 instance-
stopDB2.sh
su -l -c "db2 force application all"
su -l -c "db2 terminate"
su -l -c "db2 stop"
su -l -c "db2licd -end"
This works when I su to the instance owner (archive), and run each line. I need to... (5 Replies)
Discussion started by: jeffs42885
5 Replies
LEARN ABOUT ULTRIX
_toupper
conv(3) Library Functions Manual conv(3)Name
toupper, tolower, _toupper, _tolower, toascii - translate characters
Syntax
#include <ctype.h>
int toupper(c)
int c;
int tolower(c)
int c;
int _toupper(c)
int c;
int _tolower(c)
int c;
int toascii(c)
int c;
Description
The functions and have as their domain the range of the function. If the argument to represents a lowercase letter, the output from the
function is the corresponding uppercase letter. If the argument to represents an uppercase letter, the result is the corresponding lower-
case letter.
The case of c depends on the definition of the character in the language database. Because the case of a character can vary between lan-
guage databases, the case of c depends on what language database is in use. Specifically, the case of arguments depends on what property
tables are associated the LC_CTYPE category. Property tables are associated with the LC_CTYPE category by a successful call to the func-
tion that includes the LC_CTYPE category. If no successful call to define LC_CTYPE has occurred or if the character case information is
unavailable for the language in use, the rules of the ASCII coded character set determine the case of arguments.
If the argument to the function does not have the uppercase attribute, returns the argument unchanged. Likewise, if the argument to the
function does not have the lowercase attribute, returns it unchanged.
The macros and have the same affect as and The difference is that the argument to the macros must be an ASCII character (that is, a charac-
ter in the domain -1 to 127) and the argument must have the appropriate case. Arguments to must have the uppercase attribute and arguments
to must the lowercase attribute. The result of supplying arguments to these macros that are outside the domain or do not have the appropri-
ate case is undefined. These macros operate faster than the and functions.
The macro converts its argument to the ASCII character set. The macro converts its argument by truncating the numerical representation of
the argument so that it is between -1 and 127. You can use this macro when you move an application to a system other than an ULTRIX system.
International Environment
LC_CTYPE If this environment variable is set and valid, uses the international language database named in the definition to determine
character classification rules.
See Alsoctype(3int), setlocale(3), getc(3)conv(3)