Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 09:18 AM
тАО07-14-2008 09:18 AM
sudo
Whenever I use sudo to execute some command like su:
sudo su -
it gives me the following error:
/home/ubuaaia # sudo
sh: sudo: not found.
And when I give the full pathname of sudo like
/usr/local/bin/sudo su -
it executes successfully.
I want me and other users who have been granted sudo privilege (defined in sudoers file) can execute sudo by just typing sudo from their home directories or from any where else.How can I do that, please write the steps and commands to do that:
The second question I have how can I change the location of sudoers file from /usr/local/etc/sudoers to /etc/sudoers?
- Tags:
- sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 09:29 AM
тАО07-14-2008 09:29 AM
Re: sudo
add this line to /etc/profile
PATH=$PATH:/usr/local/bin
export PATH
>The second question I have how can I change the location of sudoers file from /usr/local/etc/sudoers to /etc/sudoers?
making a soft link is the easy way:
ln -s /usr/local/etc/sudoers /etc/sudoers
Kenan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 09:37 AM
тАО07-14-2008 09:37 AM
Re: sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 09:51 AM
тАО07-14-2008 09:51 AM
Re: sudo
As per earlier response just the path in "/etc/profile" and export it.
PATH=$PATH:/usr/local/bin
export PATH
You can add this path in "/etc/PATH" also.
Regards,
Asif Sharif
Asif Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 10:46 AM
тАО07-14-2008 10:46 AM
Re: sudo
So, no, you don't have to put /usr/local/bin in everyone's .profile. But before you do, be sure to run this command to fix the errors in the /usr/local directories:
find /usr/local -type d -exec chmod 755 {} \;
And now you can add /usr/local/bin to the /etc/PATH file. Now, everyone that logs in will see all the executables in /usr/local/bin and be protected by proper permissions for the directories.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 07:38 PM
тАО07-14-2008 07:38 PM
Re: sudo
Yes. There shouldn't be that many users using sudo? Also if they are too lazy to type the full path, they should be smart enough to be able to change their own .profile.
Just provide them a tested example.
As mentioned by Bill and Asif, you could put it in /etc/profile and /etc/PATH but I don't want /usr/local/bin/ at the beginning of my PATH, hiding the normal HP-UX linker tools with foreign devil versions.
- Tags:
- foreign devil tools