Visudo Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You are correct - I was root; however, I didn't return the permissions and
as soon as I left root, I was hosed.  The message immediately let me know
that sudoers must be 0444 in order to function.  So I basically screwed up -
changed  the permissions of the file, changed the file, DIDN'T return the
permissions back. :-(  Lesson learned.

Nick.

-----Original Message-----
From: bobpaul at gmail.com [mailto:bobpaul at gmail.com] On Behalf Of Paul
Klapperich
Sent: Thursday, August 16, 2007 07:40
To: Dr. Nicholas Shaw
Cc: maemo-users at maemo.org
Subject: Re: Visudo Help

On 8/16/07, Dr. Nicholas Shaw <Doc at docharley.com> wrote:
>
> Thanks, Paul. By default sudoers is not writable so in order to make 
> changes.
>
sudo gainroot
vi /etc/sudoers
?

Seems you would have had to be root to change the permissions anyway...

visudo exists in /sbin, so until you edit sudoers to allow user to use it,
you need to be root. Also, the EDITOR variable is undeclared, so until you
add that to .bashrc or whatever you'll need to do:

sudo gainroot
EDITOR="vi" visudo

You can of course use something other than vi if you want.

--Paul

>
>
>
> Nick.
>
>
>
>  ________________________________
>
>
> From: maemo-users-bounces at maemo.org 
> [mailto:maemo-users-bounces at maemo.org]
> On Behalf Of Paul Klapperich
>  Sent: Wednesday, August 15, 2007 9:38 PM
>  Cc: maemo-users at maemo.org
>  Subject: Re: Visudo Help
>
>
>
>
> I'm not sure if it has visudo or not and my unit isn't handy, but 
> here's a safety net:
>
>  Install OpenSSH or Dropbear, then do
>  sudo gainroot
>  passwd
>  enter a root password
>
>  Now if you mess up your /etc/sudoers, you can always open Putty/Xterm 
> on your desktop and ssh into the root account using the root password 
> you created. Additionally, you could do the above without ssh, or with 
> /etc/ssh/sshd modified to disallow root login. You should be able to 
> switch to the root user using 'su' if you have a root password set and 
> known. You may need to add 'user' to the wheel group or something, 
> though
>
>  Why did you change the permissions to sudoers in the first place? My 
> mistake is usually syntax errors inside /etc/sudoers. Oops.
>
>  --Paul
>
>
> On 8/15/07, Dr. Nicholas Shaw <Doc at docharley.com> wrote:
>
> Ok, after my major screw-up last week (I directly modified the sudoers 
> file  but failed to change the permissions back to 0444), I flashed to 
> the newest  OS upgrade and re-installed all of my applications.  Now I 
> need to modify  the sudoers file and plan to do it CORRECTLY this time,
e.g. use visudo.
>
>  Now my problem - I can't find visudo anywhere on the N800.  Is it 
> available  separately or am I just not looking in the right place? Or 
> is there some  other way that doesn't use visudo?
>
>  I've looked in /usr/bin and /bin.
>
>  Thanks much in advance!
>
>  Nick.
>
>
>  _______________________________________________
>  maemo-users mailing list
>  maemo-users at maemo.org
>  https://lists.maemo.org/mailman/listinfo/maemo-users
>
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux