04-27-2005
Do you know the name of the userid that you want to change to inside the script? If so, you can do a `chown userid` inside the script once the file has been placed in that userid's directory.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I'm a newbie to the Linux world.
I have a script that needs to run under "UserB". But I don't want to give out the password to UserB. Is there a way to setup the script to run as "UserB" when UserA runs it.
Thanks in advance for your assistance. (1 Reply)
Discussion started by: mikey20
1 Replies
2. UNIX for Dummies Questions & Answers
My shell script runs fine both as a cron job and when i issue it.
However, I wish to differentiate when it runs as a cron-job so the "echo" statements are not issued (they get mailed to me, which i don't want).
I tried checking $USER but since the cron was created in my user that does not... (5 Replies)
Discussion started by: sentinel
5 Replies
3. Shell Programming and Scripting
Good morning. I am searching for "how-to"'s for some particular questions:
1. How to write a script in HP-UX 11.
2. How to schedule a script.
3. How to "call" scripts from the original script.
4. How to su to another user from within a script.
This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies
4. Shell Programming and Scripting
Hi,
I have a shell script file which is set to access permission 000. When I login as root (sudo su) and try to run this script, I am getting the Permission denied error. I have read somewhere that root admin user can execute any kind of permission script. Then why this behavior? However, I can... (1 Reply)
Discussion started by: royalibrahim
1 Replies
5. Shell Programming and Scripting
I'm trying to use su (as myuser) to force another user (theuser) to run a shell script (thescript.sh):
su theuser -c /home/theuser/thescript.sh
However I'm running this from another script, and it is asking for theuser's password. I would rather avoid displaying it in the file (using echo... (2 Replies)
Discussion started by: asdfgg
2 Replies
6. AIX
Hi All,
Currently our application is running on the server having AIX 5.3 OS.
What we intend to do is to run a shell script owned by another user and needs to be run as that particular user.
I was trying to create a shell script using the su command before running the actual script (which... (4 Replies)
Discussion started by: acoomer
4 Replies
7. Shell Programming and Scripting
Hi , we got autosys for scheduling our jobs. Autosys user logs in to the Linux box and need to execute a shell script. problem here is user requires admin privileges on database to complete the task. Since scheduling is maintained by different team I don't want autosys user to have admin privileges... (1 Reply)
Discussion started by: rush143
1 Replies
8. Solaris
Hi All,
I have problem running a command with another user who has no login shell
the os is solaris 10
i am root and doing the following:
su user -s /bin/bash "ls"
no output .. no error messages
if su - user i got No directory
Please use CODE tags as required by forum... (2 Replies)
Discussion started by: BF_DEV
2 Replies
9. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT DEBIAN
lmtptest
LMTPTEST(1) General Commands Manual LMTPTEST(1)
*
NAME
lmtptest - interactive LMTP test program
SYNOPSIS
lmtptest [ -t keyfile ] [ -p port ] [ -m mechanism ]
[ -a userid ] [ -u userid ] [ -k num ] [ -l num ]
[ -r realm ] [ -f file ] [ -n num ] [ -c ]
[ -i ] [ -o option=value ] [ -v ] hostname
DESCRIPTION
lmtptest is a utility that allows you to authenticate to a LMTP server and interactively issue commands to it. Once authenticated you may
issue any LMTP command by simply typing it in. It is capable of multiple SASL authentication mechanisms and handles encryption layers
transparently. This utility is often used for testing the operation of a lmtp server. Also those developing LMTP clients find it useful.
OPTIONS
-t keyfile
Enable TLS. keyfile contains the TLS public and private keys. Specify "" to negotiate a TLS encryption layer but not use TLS
authentication.
-p port
Port to connect to. If left off this defaults to lmtp as defined in /etc/services.
-m mechanism
Force lmtptest to use mechanism for authentication. If not specified the strongest authentication mechanism supported by the server
is chosen.
-a userid
Userid to use for authentication; defaults to the current user. This is the userid whose password or credentials will be presented
to the server for verification.
-u userid
Userid to use for authorization; defaults to the current user. This is the userid whose identity will be assumed after authentica-
tion. NOTE: This is only used with SASL mechanisms that allow proxying (e.g. PLAIN, DIGEST-MD5).
-k num Minimum protection layer required.
-l num Maximum protection layer to use (0=none; 1=integrity; etc). For example if you are using the KERBEROS_V4 authentication mechanism
specifying 0 will force lmtptest to not use any layer and specifying 1 will force it to use the integrity layer. By default the
maximum supported protection layer will be used.
-r realm
Specify the realm to use. Certain authentication mechanisms (e.g. DIGEST-MD5) may require one to specify the realm.
-f file
Pipe file into connection after authentication.
-n num Number of authentication attempts; default = 1. The client will attempt to do SSL/TLS session reuse and/or fast reauth (e.g.
DIGEST-MD5), if possible.
-c Enable challenge prompt callbacks. This will cause the OTP mechanism to ask for the the one-time password instead of the secret
pass-phrase (library generates the correct response).
-i Don't send an initial client response for SASL mechanisms, even if the protocol supports it.
-o option=value
Set the SASL option to value.
-v Verbose. Print out more information than usual.
SEE ALSO
lmtpd(8)
CMU
Project Cyrus LMTPTEST(1)