1837997 Members
7987 Online
110124 Solutions
New Discussion

ln -s and ln command

 
SOLVED
Go to solution
tom quach_1
Super Advisor

ln -s and ln command

hi all,

instead of running privrun, i did a soft link
#ln -s /usr/bin/privrun /usr/bin/sudo
when run sudo command i got this error below, make a hard link and still got the same error.

$sudo lpfence hp5000 6
sudo: Invalid hard link name to privrun.

Does anyone has any input on this.
Thanks in advance!
Regards,
Tom
4 REPLIES 4
Dennis Handly
Acclaimed Contributor
Solution

Re: ln -s and ln command

Why are you changing the base name of the link from sudo to privrun?
This is probably what is upsetting it.

Instead you may want to set up a shell alias to rename it.

Or have a script for sudo:
#!/usr/bin/sh
exec /usr/bin/privrun "$@"
Suraj K Sankari
Honored Contributor

Re: ln -s and ln command

Hi,

Better create aliase for /usr/bin/privrun into sudo
alias /usr/bin/privrun sudo

Suraj
tom quach_1
Super Advisor

Re: ln -s and ln command

Thanks Dennis & Sura,

Both work good.
the reason for the change because users had been using sudo for a long time and now on 11.31 i want to use RBAC. now instead of telling them to replace sudo with privrun
i just change the name of privrun to sudo
Regards,
Tom
tom quach_1
Super Advisor

Re: ln -s and ln command

Thanks,