Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-18-2012, 06:48 PM
|
#1
|
LQ Newbie
Registered: Apr 2012
Posts: 2
Rep: 
|
VIM, NANO, Gedit, CAT display VISUDO as garbage
VIM, NANO, Gedit, CAT are displaying the visudo file on CentOS 6.2 as a bunch of garbage. Gedit gives me an error about UTF-8 encoding. This happens over SSH too. Tried as root (su) and regular user. What is going on here?
|
|
|
04-19-2012, 12:14 AM
|
#2
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
Have you tried setting your locale to an UTF setting
in debian its
Code:
sudo dpkg-reconfigure locales
|
|
|
04-19-2012, 12:39 PM
|
#3
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,250
|
Check your locale with the "locale" command. So my output starts with
LANG=en_GB.utf8
There's a file /etc/sysconfig/i18n that sets the locale for the console: mine has
LANG="en_US.UTF-8"
which is presumably a default, and the installer only set the language for X. The only idea I have for setting the locale in X is to add an "export LANG=" to ~/.bashrc but I offer no promises. As for the difference of UTF-8 and utf8, that's a mystery to me.
Last edited by DavidMcCann; 04-19-2012 at 12:41 PM.
|
|
|
04-19-2012, 01:21 PM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,712
|
Quote:
Originally Posted by xtropx
VIM, NANO, Gedit, CAT are displaying the visudo file on CentOS 6.2 as a bunch of garbage. Gedit gives me an error about UTF-8 encoding. This happens over SSH too. Tried as root (su) and regular user. What is going on here?
|
Exactly what SHOULD be going on. Visudo is a binary program, not a text file. All you're going to see is 'garbage' (that is, compiled hex code). Try editing any regular text-type file.
|
|
|
04-19-2012, 07:10 PM
|
#5
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,440
|
Dagnabbit! I should have seen that too; looked at this qn a few times in passing and didn't click grrrr 
<drinks coffee>
|
|
|
04-20-2012, 12:20 PM
|
#6
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,250
|
We all jumped to the conclusion that the OP meant sudoers! It takes me back to school-days: "Answer the question you are asked, not the one you expected."
|
|
|
04-29-2012, 11:48 AM
|
#7
|
LQ Newbie
Registered: Apr 2012
Posts: 2
Original Poster
Rep: 
|
Quote:
Exactly what SHOULD be going on. Visudo is a binary program, not a text file. All you're going to see is 'garbage' (that is, compiled hex code). Try editing any regular text-type file.
|
Ok, thank you. What is the proper procedure then to give a user sudo capabilities on Debian? I was under the impression you just added the user to that file, but that doesn't make much sense if you can't edit it with anything...
|
|
|
04-30-2012, 01:18 PM
|
#8
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,712
|
Quote:
Originally Posted by xtropx
Ok, thank you. What is the proper procedure then to give a user sudo capabilities on Debian? I was under the impression you just added the user to that file, but that doesn't make much sense if you can't edit it with anything...
|
Very first hit for "how to give a user sudo rights in linux":
http://www.linuxhomenetworking.com/w...Users_and_Sudo
You edit the sudoers file, and for that, you have to use a specific tool, called visudo.
|
|
|
All times are GMT -5. The time now is 06:06 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|