sccs: Change user id

I want to run sccs from a 'protected' userid (custst). When a user (say xyz) requests a source, I want to run "sccs get -g XXXX.src" but for sccs to log xyz as the owner not custst. sccs appears to have no parameters to do this, and I can find no information in the manuals on where sccs gets the id it logs from.
hughmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jlevieCommented:
I'm pretty sure it just uses the uid of the user that ran the command. You'd have to become that user when you ran the sccs command. This can be done by su'ing to the user, or I think you could use a suid script to execute the sccs command. The later seems to me to be the most attractive since you don't have to enter xyz's password, but since I use CVS instead of sccs I can't test it. Why don't you try creating a script, something like:

#!/bin/sh
sccsget -g $1

chown the script to user xyz, and "chmod u+s" the script.

If that doesn't work, I've got another way involving a small C program that will, for sure. You'd need root privs to install it though.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
meerakCommented:
As far as I now recent versions of unix does not allow setuser id
shell scripts. You need to write a C program and make the executable
a set user id program.
0
hughmAuthor Commented:
Unfortunately I am not allowed su access, so what I ended up doing was writing scripts (using awk) that edited the p. file and the s. file to put the correct uid into the files after I had finished.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.