1833625 Members
3544 Online
110062 Solutions
New Discussion

su -

 
SOLVED
Go to solution
Faizer Jameel
Frequent Advisor

su -

Gentlemen
How can I force users to use the su with the "-" instead of just su.
as I do dot want the new shell to starts as if a subshell was invoked.
Thanks
Faizer
5 REPLIES 5
MarkSyder
Honored Contributor
Solution

Re: su -

How about putting an alias in their profile?

alias su="su -"

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
sudhapage
Regular Advisor

Re: su -

Yes alias is the best way to do it.

Regards,
Sudhakaran.K
spex
Honored Contributor

Re: su -

Hi Faizer,

Of course, if you go the alias route, there's nothing preventing your users from doing an 'unalias su', or from '/usr/bin/su - '.

PCS
KapilRaj
Honored Contributor

Re: su -

I would , set an alias and will not tell them ;)

OR

I would have /usr/mybin in the user's PATH before /usr/bin and will have a shell script named su which will do /usr/bin/su -

OR

Will change the password. and set up sudo for the same.
Nothing is impossible
Faizer Jameel
Frequent Advisor

Re: su -

Thankyou.... all are workable solutions which I have tried. These are working.
Thanks allround.

PS. My apologies...I should have not have addressed thread specific to a Gender group.