sccs: Change user id

Posted on 2000-02-11
Medium Priority
Last Modified: 2010-05-18
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.
Question by:hughm
LVL 40

Accepted Solution

jlevie earned 200 total points
ID: 2514384
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:

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.

Expert Comment

ID: 2519583
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.

Author Comment

ID: 2583578
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.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question