Operating System - HP-UX
1829615 Members
2053 Online
109992 Solutions
New Discussion

Re: Modify users PATH HPUX10.20

 
T.Knoerr
Occasional Contributor

Modify users PATH HPUX10.20

Hi there.

Could anybody be so kind to tell me, how to modify the PATH for a special user ?
(eg. the user "lk" should have /usr/sbin in his PATH, other users of the same user-group NOT)

Thanks !
6 REPLIES 6
Thierry Poels_1
Honored Contributor

Re: Modify users PATH HPUX10.20

hi,
edit the user's .profile and add/modify:

PATH=$PATH:/usr/sbin
export PATH

(other syntax for csh)
good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
harry d brown jr
Honored Contributor

Re: Modify users PATH HPUX10.20

Add the path to their /home account .profile or .kshrc using export PATH=$PATH:/usr/sbin
Live Free or Die
James R. Ferguson
Acclaimed Contributor

Re: Modify users PATH HPUX10.20

Hi:

In the $HOME/.profile of the user that you want to have /usr/sbin in the PATH, edit the PATH variable to include /usr/sbin.

The colon (:) character is the PATH delimiter and a period (.) terminates the PATH string.
The elements (fields) of the PATH are examined in the order that they appear.

Regards!

...JRF...
linuxfan
Honored Contributor

Re: Modify users PATH HPUX10.20

Hi,

For ksh or posix-sh you could modify the user's .profile and add
export PATH=$PATH:/usr/sbin

for csh, modify it and add
setenv PATH $PATH:/usr/sbin

If the user doesn't have a .profile you can copy a default one from /usr/newconfig/etc/skel

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Joseph C. Denman
Honored Contributor

Re: Modify users PATH HPUX10.20

cat /etc/passwd | grep lk
#note the users home directory
cd /users/home/dir
vi .profile
#make the modification to the PATH entry


...jcd...
If I had only read the instructions first??
T.Knoerr
Occasional Contributor

Re: Modify users PATH HPUX10.20

WOW !
You all answered very fast. Unfortunately I?m at home now. But tomorrow I`ll try to manage the problem.

Many thanks for all the hints.

Regards, Torsten
PS: I?m not familiar in "HPUXing", cause I started last week with it :)