Can'tedit anything-Sudoers file? [SOLVED]

You have a problem with Salix? Post here and we'll do what we can to help.

Re: Can'tedit anything-Sudoers file?

Postby mimosa » 29. Jun 2012, 18:09

Code: Select all
$vimtutor
User avatar
mimosa
 
Posts: 1773
Joined: 25. May 2010, 17:02

Re: Can'tedit anything-Sudoers file?

Postby travalon » 1. Jul 2012, 01:07

First I would like to apologize for being vague in what I was trying to do. I know it has to be irritating to hear "NEED HELP!!!" and then have us noobs not tell you what kind. No excuses. Now I forget what I was trying to do.

I appreciate every ones responses and input.

The file I am trying to edit is a conky.config file found in /ect/conky.
It is not from a different distro install. I specifically DLL it for Salix.

I was following the Salix users manual and after getting w3m I got conky using Slapt-get install.

I tried to edit it using nano and Geany but couldn't save.

I haven't tried this for the conky file. Seems like it may work.
Code: Select all

To belong to the sudo group, i did this:
The file /etc/sudoers is outside your /home, thus you have to become ROOT, launch a terminal:

Code: Select all
    $ su
    password: type here your root password
    and you become ROOT when you see the hash mark (#)



Now you're ROOT and can edit the /etc/sudoers file:

Code: Select all
    # nano /etc/sudoers
    edit, adding the line you want to the file.
    (i added myself to the group 'wheel' and uncommented the line for those belonging to that group)

    ## Same thing without a password
    %wheel ALL=(ALL) NOPASSWD: ALL
    save/exit




I can sign in as root Ctrl+alt+F1 but I understand that is a bad idea so I don't do it. I want to learn how to do things correctly.

I will follow the links provided and do what I can to educate myself.

Thank you again for the links and explanations
travalon
 
Posts: 10
Joined: 27. Jun 2012, 07:22

Re: Can'tedit anything-Sudoers file?

Postby Adys » 1. Jul 2012, 10:41

I am (very) possibly wrong, but I think that this should be simpler than it sounds.

This was already mentioned, but... use "su".

Open a terminal. Type "su" (without quotation marks). <enter>. Type in the adequate password. <enter>.

Now type the command you want/need. For example, type "nano" (without quotation marks) and press <enter>. With nano, open your file, edit it, save it.

After changing the config file, if conky still doesn't work as you intended, try, just in case, saving your session and logging in again. Still not good enough? Go "crazy" :shock: :mrgreen: and close the OS and reboot.

Again, it is very possible I am wrong somewhere in this post (or even entirely wrong). In any case, please report back.
Adys
 
Posts: 154
Joined: 3. Apr 2012, 04:17

Re: Can'tedit anything-Sudoers file?

Postby Tim CowChip » 1. Jul 2012, 20:24

travalon wrote:The file I am trying to edit is a conky.config file found in /ect/conky.


It should be /etc/conky and all you have to do is make it a ~./conkyrc file which you can edit without superuser permissions.

Code: Select all
cp /etc/conky/conky.config ~/.conkyrc
ImageImageImage
User avatar
Tim CowChip
 
Posts: 273
Joined: 27. May 2011, 03:35
Location: in a van down by the river

Re: Can'tedit anything-Sudoers file?

Postby travalon » 2. Jul 2012, 04:45

Thank you again.

I opened a terminal "su" password cd to /etc/conky/conky.conf did not rename the file then nano conky.conf it opened in nano I edited 1 thing and saved. It worked the effect was obvious as the conky display is now on the right side of my screen.

The su solved my problem. However I would still like to join the sudoers club. Maybe I'm paranoid but what could happen if I forget to exit out of root? I figure sudo+password would limit the damages I could do.
travalon
 
Posts: 10
Joined: 27. Jun 2012, 07:22

Re: Can'tedit anything-Sudoers file?

Postby Tim CowChip » 2. Jul 2012, 06:32

self-explanatory:

Code: Select all
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL


as root:

Code: Select all
gpasswd -a <username> wheel


you should place .conkyrc in your home directory where you make changes to it without needing superuser permission.
ImageImageImage
User avatar
Tim CowChip
 
Posts: 273
Joined: 27. May 2011, 03:35
Location: in a van down by the river

Re: Can'tedit anything-Sudoers file?

Postby travalon » 2. Jul 2012, 07:43

Thanks gapan
the tuxfiles were/are/will be a great resource for me, I understand ownership and permissions now. I couldn't get the other link to load but I have enough home work for a little while. I'llget to the vim stuff soon enough.

Thx again
travalon
 
Posts: 10
Joined: 27. Jun 2012, 07:22

Re: Can'tedit anything-Sudoers file?

Postby Tim CowChip » 2. Jul 2012, 16:47

Here's another good resource:

Code: Select all
man conky


and another one:

Code: Select all
man sudo
ImageImageImage
User avatar
Tim CowChip
 
Posts: 273
Joined: 27. May 2011, 03:35
Location: in a van down by the river

Re: Can'tedit anything-Sudoers file?

Postby travalon » 14. Jul 2012, 15:33

Although I haven'treally accomplished my goal, I am going to mark this one solved. I am very new to linux and even newer to Salix/Slackware. I have realized that I have a working system and as I learn I will be able to accomplish more and more tasks. By the time I make it into the sudoers club I will have a much smaller chance of killing my install. I usually want instant gratification but, in this instance I will have to settle for actually learning and retaining which is my master goal.

Thank you to all who tried to assist me and thank you to the developers for building a great distro that I will find it a pleasure to learn.
travalon
 
Posts: 10
Joined: 27. Jun 2012, 07:22

Previous

Return to Problems