What is the difference between `sudoedit` and `sudo vim`?

What is the difference between sudo vim /etc/services and sudoedit /etc/services? I tried to edit the /etc/services file in linux. sudoedit is allowing to edit, but sudo vim is not allowing to edit.


Sudoedit specifies sudo with the '-e' option. From the man page:

 -e          The -e (edit) option indicates that, instead of running a command, the
             user wishes to edit one or more files.  In lieu of a command, the string
             "sudoedit" is used when consulting the security policy.  If the user is
             authorized by the policy, the following steps are taken.

Therefor, it allows the system administrator to only allow sudo rights for editing certain files, not specific commands or all files in general. It allows the administrator to control which files a user (or groups of users) can edit with elevated privileges.

What's more, the user can still use his/her preferred editor, not one that is specified by the administrator. It also runs this editor as the user itself, meaning that any options or commands specified in a .vimrc by the user for example will apply.

Need Your Help

Magento: how to call static block in category page within content

php magento

I am trying to call a static cms block with id BLOCKID from within the content section of the category. I tried using the following and it doesn't work:

Whats the best way to find the “next but one newest” date in SQL?

sql sql-server-2008 tsql

I have a table in SQL Server that holds data organised by BusinessDataDate. BusinessDataDate is a Date only (no time component) and is only populated on Business days. e.g. not Weekends or public

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.