05-21-2005
Some OS's allow you to use the SUID bit on a script - it isn't recommended but it will do the job. If the script is owned by fooadm and chmod'd 4755 then it will run as if executed by the owner.
You could look into expect for providing the password to su, or yes, sudo is a good option.
Cheers
ZB
10 More Discussions You Might Find Interesting
1. Solaris
Hi Folks,
I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error.
For example, when I am logged in as 'webadmin', I have the following file:
... (4 Replies)
Discussion started by: brizrobbo
4 Replies
2. UNIX for Dummies Questions & Answers
How to track the status of a shell script running under a particular owner which is running in the background? (2 Replies)
Discussion started by: ishmael^soyuz
2 Replies
3. Solaris
Hi,
i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell.
How do i distinguish whether my script is run by init process or by shell??
Will the command
/proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies
4. UNIX for Advanced & Expert Users
Hi all,
We have some files are under 744 permissions and the the owner is say owner1 and group1.
Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that.
... (14 Replies)
Discussion started by: TheGunMan
14 Replies
5. Shell Programming and Scripting
Hi All,
I have a script in which the contents of the script can be run only with Admin account (inst1).
the script has connecting to database and performing some routine database admin tasks. This script should be able to execute by non admin (devp2) user, but the script itself should be... (2 Replies)
Discussion started by: vinredmac
2 Replies
6. Shell Programming and Scripting
Hello, I'm trying to write a script which is listing files based on different preferences, like filetype or permissions. All is fine, except for one: I want to list files in /home which has a different owner than the home directory it is in.
Here is an example:
/home/UserA is the directory, and... (10 Replies)
Discussion started by: Zwiebi
10 Replies
7. Solaris
i need to do the following operations in solaris 10:
1.change owner and group owner for files which are not owned by the current user and user group
2.to can delete files in the /tmp directory which are not of the current user
3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies
8. AIX
Hi all,
How to inform server owner if the particular process is down.
I need command or script to do the above.
TIA (3 Replies)
Discussion started by: sumanthupar
3 Replies
9. Shell Programming and Scripting
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies
10. Shell Programming and Scripting
Hi,
I have a script which does couple of database connection and run some SELECT queries to get some output in the file.
I am surprised to see :eek: that when i run my script some times it gives the desired out put and sometimes it shows some error :confused: .
Suppose if i execute it say... (3 Replies)
Discussion started by: Sharma331
3 Replies
wwsetup(8) System Manager's Manual wwsetup(8)
NAME
wwsetup, wnn - Sets up the 8-bit option for sendmail and the Wnn character-cell input method for Japanese
SYNOPSIS
/usr/sbin/wwsetup
DESCRIPTION
The wwsetup script performs one or both of the following tasks: Enables or disables 8-bit transmission code, which is an option supported
by sendmail software
By default, sendmail uses the 7-bit SMTP mail transmission protocol that is the standard for sending mail over a TCP/IP network.
Note that enabling the 8-bit option is not generally recommended because it violates the SMTP mail transmission protocol. Config-
ures the Wnn software that supports a character-cell input method that is widely used in Japan
If the Tru64 UNIX IOSJPWNNnnn subset is installed, the wwsetup script asks if you want to create the following links if they do not
already exist on the system:
/usr/local/bin/Wnn4 --> /usr/i18n/bin/Wnn4 /usr/local/bin/wnn --> /usr/i18n/lib/wnn
The script also prompts you to enter the password for Wnn dictionaries if they do not already exist on the system.
Both the links and the dictionary password must be in place before Wnn software can be used.
SEE ALSO
Commands: sendmail(8), jserver(1wnn)
Note that the jserver(1wnn) reference page is available only in Japanese and is included in the subset that contains Japanese translations
of reference pages.
Others: i18n_intro(5), Japanese(5), l10n_intro(5)
wwsetup(8)