another user script


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users another user script
# 8  
Old 10-05-2002
Re: can't assign SUID to a shell script

Quote:
Originally posted by Kelam_Magnus
I didn't think you can use SUID for a shell script?

I believe that you can setup "sudo" privledges for the other user. Here are a few posts that may help.


i know in AIX 4.3 you can. i have my remote locations run backups that have to be run as root but i just suided the backup script so they can run it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Switch from Local user to root user from a shell script?

Hi, I need to switch from local user to root user in a shell script. I need to make it automated so that it doesn't prompt for the root password. I heard the su command will do that work but it prompt for the password. and also can someone tell me whether su command spawns a new shell or... (1 Reply)
Discussion started by: Little
1 Replies

2. Shell Programming and Scripting

Script interacts with user , based on user input it operates

i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled. #!/bin/sh echo " Enter your choice to continue y/Y OR n/N to quit " read A if then echo " user requested to continue " ##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies

3. Shell Programming and Scripting

Login into another user from user inside script

now i have logged in username : ramesh in unix Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user. Inside script, i have to login into su - ram along with password : haihow and have to... (4 Replies)
Discussion started by: rammm
4 Replies

4. Shell Programming and Scripting

How to Login as another user through Shell script from current user[Not Root]

Hi Every body, I would need a shell script program to login as different user and perform some copy commands in the script. example: Supppose ora_toms is the active user ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands ... (9 Replies)
Discussion started by: ujjwal27
9 Replies

5. Shell Programming and Scripting

Shell Script to change a user password using script

Hi Experts, I had tried to executes this script to change the user password through script: No lines in buffer #!/bin/ksh cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1 cat /etc/passwd | grep userid >> /tmp/pass.tmp2 PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2` PASS2=`q2w3e4r5` sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies

6. UNIX for Advanced & Expert Users

Determining if user is local-user in /etc/passwd or LDAP user

Besides doing some shell-script which loops through /etc/passwd, I was wondering if there was some command that would tell me, like an enhanced version of getent. The Operating system is Solaris 10 (recent-ish revision) using Sun DS for LDAP. (5 Replies)
Discussion started by: ckmehta
5 Replies

7. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

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

8. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

9. Shell Programming and Scripting

Running script from other user rather than login user

Hi, My requirement is that i am login from ROOT in a script but when any command is coming which is logging to sqlplus then i have to run it with normal user as only normal user have permission to connect to sqlplus . i tried making a script like this : #! /bin/ksh su -... (3 Replies)
Discussion started by: rawatds
3 Replies

10. Shell Programming and Scripting

How do i change to super user then revert back to ordinary user ,using shell script?

Hi all, I am trying to eject the cdrom from a livecd after certain stage... Now assuming that it is possible to eject,please consider my issue!!! The OS boots into a regular user by default...so i am unable to use the eject command to push out the drive... However if i try pfexec eject it... (3 Replies)
Discussion started by: wrapster
3 Replies
Login or Register to Ask a Question
KIBITZ(1)						      General Commands Manual							 KIBITZ(1)

NAME
kibitz - allow two people to interact with one shell SYNOPSIS
kibitz [ kibitz-args ] user [ program program-args... ] kibitz [ kibitz-args ] user@host [ program program-args... ] INTRODUCTION
kibitz allows two (or more) people to interact with one shell (or any arbitrary program). Uses include: o A novice user can ask an expert user for help. Using kibitz, the expert can see what the user is doing, and offer advice or show how to do it right. o By running kibitz and then starting a full-screen editor, people may carry out a conversation, retaining the ability to scroll backwards, save the entire conversation, or even edit it while in progress. o People can team up on games, document editing, or other cooperative tasks where each person has strengths and weaknesses that complement one another. USAGE
To start kibitz, user1 runs kibitz with the argument of the user to kibitz. For example: kibitz user2 kibitz starts a new shell (or another program, if given on the command line), while prompting user2 to run kibitz. If user2 runs kibitz as directed, the keystrokes of both users become the input of the shell. Similarly, both users receive the output from the shell. To terminate kibitz it suffices to terminate the shell itself. For example, if either user types ^D (and the shell accepts this to be EOF), the shell terminates followed by kibitz. Normally, all characters are passed uninterpreted. However, if the escape character (described when kibitz starts) is issued, the user may talk directly to the kibitz interpreter. Any Expect(1) or Tcl(3) commands may be given. Also, job control may be used while in the inter- preter, to, for example, suspend or restart kibitz. Various processes can provide various effects. For example, you can emulate a two-way write(1) session with the command: kibitz user2 sleep 1000000 ARGUMENTS
kibitz takes arguments, these should also be separated by whitespace. The -noproc flag runs kibitz with no process underneath. Characters are passed to the other kibitz. This is particularly useful for con- necting multiple interactive processes together. In this mode, characters are not echoed back to the typist. -noescape disables the escape character. -escape char sets the escape character. The default escape character is ^]. -silent turns off informational messages describing what kibitz is doing to initiate a connection. -tty ttyname defines the tty to which the invitation should be sent. If you start kibitz to user2 on a remote computer, kibitz performs a rlogin to the remote computer with your current username. The flag -proxy username causes rlogin to use username for the remote login (e.g. if your account on the remote computer has a different username). If the -proxy flag is not given, kibitz tries to determine your current username by (in that order) inspecting the environment variables USER and LOGNAME, then by using the commands whoami and logname. The arguments -noescape and -escape can also be given by user2 when prompted to run kibitz. MORE THAN TWO USERS
The current implementation of kibitz explicitly understands only two users, however, it is nonetheless possible to have a three (or more) -way kibitz, by kibitzing another kibitz. For example, the following command runs kibitz with the current user, user2, and user3: % kibitz user2 kibitz user3 Additional users may be added by simply appending more "kibitz user" commands. The xkibitz script is similar to kibitz but supports the ability to add additional users (and drop them) dynamically. CAVEATS
kibitz assumes the 2nd user has the same terminal type and size as the 1st user. If this assumption is incorrect, graphical programs may display oddly. kibitz handles character graphics, but cannot handle bitmapped graphics. Thus, % xterm -e kibitz will work % kibitz xterm will not work However, you can get the effect of the latter command by using xkibitz (see SEE ALSO below). kibitz uses the same permissions as used by rlogin, rsh, etc. Thus, you can only kibitz to users at hosts for which you can rlogin. Similarly, kibitz will prompt for a password on the remote host if rlogin would. If you kibitz to users at remote hosts, kibitz needs to distinguish your prompt from other things that may precede it during login. (Ide- ally, the end of it is preferred but any part should suffice.) If you have an unusual prompt, set the environment variable EXPECT_PROMPT to an egrep(1)-style regular expression. Brackets should be preceded with one backslash in ranges, and three backslashes for literal brackets. The default prompt r.e. is "($|%|#) ". kibitz requires the kibitz program on both hosts. kibitz requires expect(1). By comparison, the xkibitz script uses the X authorization mechanism for inter-host communication so it does not need to login, recognize your prompt, or require kibitz on the remote host. It does however need permission to access the other X servers. BUGS
An early version of Sun's tmpfs had a bug in it that causes kibitz to blow up. If kibitz reports "error flushing ...: Is a directory" ask Sun for patch #100174. If your Expect is not compiled with multiple-process support (i.e., you do not have a working select or poll), you will not be able to run kibitz. ENVIRONMENT
The environment variable SHELL is used to determine the shell to start, if no other program is given on the command line. If the environment variable EXPECT_PROMPT exists, it is taken as a regular expression which matches the end of your login prompt (but does not otherwise occur while logging in). See also CAVEATS above. If the environment variables USER or LOGNAME are defined, they are used to determine the current user name for a kibitz to a remote com- puter. See description of the -proxy option in ARGUMENTS above. SEE ALSO
Tcl(3), libexpect(3), xkibitz(1) "Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995. "Kibitz - Connecting Multiple Interactive Programs Together", by Don Libes, Software - Practice & Experience, John Wiley & Sons, West Sus- sex, England, Vol. 23, No. 5, May, 1993. AUTHOR
Don Libes, National Institute of Standards and Technology kibitz is in the public domain. NIST and I would appreciate credit if this program or parts of it are used. 19 October 1994 KIBITZ(1)