Sponsored Content
Top Forums UNIX for Advanced & Expert Users running script as different owner Post 72523 by zazzybob on Saturday 21st of May 2005 12:34:58 AM
Old 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

Owner of file gets 'not owner' error for chgrp

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

status of the script running under a particular owner?

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

Running from Shell Vs running from RC script

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

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

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

Others Running a script as owner

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

Shell script that lists files with different owner than the folder

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

Privileges : modify dir/file owner by other that's not owner

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

Command or script to inform server owner about process

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

Script will keep checking running status of another script and also restart called script at night

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

Why script is running sometimes and not running sometimes?

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)
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy