Operating System - HP-UX
1832757 Members
2894 Online
110045 Solutions
New Discussion

directory control with EUID

 
SOLVED
Go to solution

directory control with EUID

hi,
i'm writing a shell script for a new user for
software-rolling which used to be the job of another user...this new user's login program is the script which displays a menu...the,
problem is that the new user must su to the
other user before the menu displays...in the
menu, there is a choice to take a shell, but,
i actually want that user just to deal with
a few directories...however, because it switches to other user, it can change to any
directory..is there a way to allow the user
to just a few directories by lookin at its
UID rather than EUID?
thx...
it's all a game
3 REPLIES 3
Jeff Machols
Esteemed Contributor
Solution

Re: directory control with EUID

whoami - EUID
who am i - UID

Re: directory control with EUID

thx Jeff,
but how can i use this for my purpose?
let me explain in more detail:
1) i login as newuser
2) this new user (su)s to other user(by the
profile,not by the user itself) and performes
the jobs in the menu...
3) the user needs a shell (say to check something)
(only 2 directories actuall needed for that user)
4) the user UID is (say newuser) but he has
now EUID when he is in the shell, because of
(su)ing when the login profile executes, which
causes the user to freely travel between all
directories...
5) i wonder if i could limit the directories
to travel someway...
it's all a game
Jeff Machols
Esteemed Contributor

Re: directory control with EUID

When you give the user a shell, you could give them an rsh so they can't cd. You would have create a link from the two directories to the home dircetory. They can view the contents of file, do an ls on the link to see whats in the dircetory, etc...