Sponsored Content
Full Discussion: Help with su
Top Forums UNIX for Advanced & Expert Users Help with su Post 302292038 by frozentin on Thursday 26th of February 2009 06:30:57 PM
Old 02-26-2009
What you could do is make "root" the owner of the file (and chmod 500), and then run your script. It won't prompt "root" for passwords.
 
install(1)						      General Commands Manual							install(1)

Name
       install - install binaries

Syntax
       install [-c] [-m mode] [-o owner] [-g group] [-s] binary destination

Description
       The  binary  is moved to destination.  If destination already exists, it is removed before binary is moved.  If the destination is a direc-
       tory then binary is moved into the destination directory with its original file-name.

       The command refuses to move a file onto itself.

Options
       -c		   Copies binary to destination.

       -g group 	   Specifies a different group from group staff for destination.  The destination is changed to group system; the -g group
			   option  may	be used to specify a different group.  The user must belong to the specified group and be the owner of the
			   file or the superuser.

       -m mode		   Specifies a different mode from the standard 755 for destination.

       -o owner 	   Specifies a different owner from owner root for destination.  The destination is changed  to  current  owner.   The	-o
			   owner option may be used to specify a different owner, but only the superuser can change the owner.

       -s		   Strips the binary after it is installed.

See Also
       chgrp(1), chmod(1), cp(1), mv(1), strip(1), chown(8)

																	install(1)
All times are GMT -4. The time now is 07:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy