[Solved] sudo configuration and question about apt-get

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[Solved] sudo configuration and question about apt-get

Postby archp2008 » May 28th, '14, 00:33

I haven't done much since except for adding my printer to the 8 linux distros I have installed at the moment. Today in Mageia I find that I am not in the sudoers list. the command vi /etc/sudoers returns permission denied. Would this be related to the way I have recovered my installation? What should be my next step?
Last edited by archp2008 on May 29th, '14, 03:36, edited 1 time in total.
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: Error mounting partition for Mageia 4

Postby doktor5000 » May 28th, '14, 01:16

As a general hint and golden rule: Please only one problem per thread ;)
sudoers should be edited as root with
Code: Select all
visudo

You may want to check https://wiki.mageia.org/en/Configuring_sudo
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18067
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Error mounting partition for Mageia 4

Postby archp2008 » May 28th, '14, 03:04

Thanks for this. Sudo is installed but get access denied in next step:

[arch@localhost ~]$ echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/01wheel
bash: /etc/sudoers.d/01wheel: Permission denied

What should I try next?
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: Error mounting partition for Mageia 4

Postby archp2008 » May 28th, '14, 03:14

Password:
[root@localhost arch]# echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/01wheel
[root@localhost arch]# end copy & paste
[1] 7979
bash: end: command not found
Why does it say end command is not found?
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: Error mounting partition for Mageia 4

Postby archp2008 » May 28th, '14, 03:27

I went into Mageia Control Centre and added arch to wheel.
Now I get
[arch@localhost ~]$ sudo add-apt-repository ppa:michael-gruz/canon-trunk
[sudo] password for arch:
sudo: add-apt-repository: command not found
[arch@localhost ~]$
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: Error mounting partition for Mageia 4

Postby benmc » May 28th, '14, 03:52

Hi

As your original post has been solved, correct? please prefix your original post with [ solved ].
doktor5000 wrote:As a general hint and golden rule: Please only one problem per thread ;)


please start a new topic for :
archp2008 wrote:I went into Mageia Control Centre and added arch to wheel.
Now I get
[arch@localhost ~]$ sudo add-apt-repository ppa:michael-gruz/canon-trunk
[sudo] password for arch:
sudo: add-apt-repository: command not found
[arch@localhost ~]$


p.s You can add a specific mirror via MCC gui or URPM cli
benmc
 
Posts: 1218
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Error mounting partition for Mageia 4

Postby archp2008 » May 28th, '14, 05:19

As your original post has been solved, correct? please prefix your original post with [ solved ].
I just marked [solved] in front of the subject line for my first quote. Is that what I am supposed to do? If you prefer, would you please move the new stuff about sudo to a new thread or I will start it again myself. Sorry.
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: Error mounting partition for Mageia 4

Postby benmc » May 28th, '14, 06:13

great.

just start a new topic with a meaningful title, as you did here.
eg:" How can I add a PPA repository "
archp2008 wrote:add-apt-repository ppa:michael-gruz/canon-trunk
if I understand this is what you are trying to achieve?
then explain what you would like to do and any steps you have taken to try to do this, but are having a problem with, as you have done here.
benmc
 
Posts: 1218
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: sudo configuration and question about apt-get

Postby doktor5000 » May 28th, '14, 06:55

I've split it into a new thread.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18067
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Error mounting partition for Mageia 4

Postby doktor5000 » May 28th, '14, 07:01

Please next time use code tags as explained in ftp://ftp5.gwdg.de/pub/linux/mandriva/m ... e_tags.ogv

archp2008 wrote:Thanks for this. Sudo is installed but get access denied in next step:

[arch@localhost ~]$ echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/01wheel
bash: /etc/sudoers.d/01wheel: Permission denied



You try as normal user to write to a directory which requires root permissions. What do you expect?

archp2008 wrote:[arch@localhost ~]$ sudo add-apt-repository ppa:michael-gruz/canon-trunk
[sudo] password for arch:
sudo: add-apt-repository: command not found
[arch@localhost ~]$

apt-get is a command for Debian-based systems. apt is not installed by default on Mageia, as we use rpm as package format.
But even if you would install it, the Ubuntu packages you are trying to install will probably not work correctly or at all.

What do you want to achieve with that?

archp2008 wrote:[root@localhost arch]# echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/01wheel
[root@localhost arch]# end copy & paste
[1] 7979
bash: end: command not found
Why does it say end command is not found?

Because that's what you entered at the prompt.

And as mentioned, best use visudo as root for sudo configuration. From what I can see, /etc/sudoers.d/ is not even enabled by default on Mageia.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18067
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: sudo configuration and question about apt-get

Postby archp2008 » May 29th, '14, 03:11

As an update to this thread, what I was originally trying to do was to add my printer a Canon Pixma MP520 to Mageia. I have done this successfully for the other seven Ubuntu type distros that I have installed on the hard drive. I started out following this guide: http://linuxg.net/how-to-install-driver ... ry-os-0-2/
Then I found out that it was a lot faster to simply add the printer in the System Settings. I tried the latter method unsuccessfully in Mageia 4 I so went back to trying the terminal mode method. I found that for the first sudo command I got the reply "user is not in the sudoers list." Doktor500 referred me to the a sudo configuration guide given previously. I am not sure if I completed this configuration guide successfully or not, just that the first command in the guide: sudo add-apt-repository ppa:michael-gruz/canon-trunk now returns "sudo: add-apt-repository: command not found." Thanks in advance for any further assistance in progressing from here.
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: [Solved] sudo configuration and question about apt-get

Postby archp2008 » May 29th, '14, 03:37

I went back to Control Center and found that the printer installed successfully.
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16

Re: [Solved] sudo configuration and question about apt-get

Postby benmc » May 29th, '14, 04:21

good to know.

As it is a multifunction device,you will also have to install the scanner utility from Mageia Control Centre, if you wish to use the scanner part.
benmc
 
Posts: 1218
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: sudo configuration and question about apt-get

Postby tarakbumba » May 29th, '14, 15:24

archp2008 wrote: I am not sure if I completed this configuration guide successfully or not, just that the first command in the guide: sudo add-apt-repository ppa:michael-gruz/canon-trunk now returns "sudo: add-apt-repository: command not found." Thanks in advance for any further assistance in progressing from here.


Those instructions for Debian based distros like *buntu, LinuxMint etc. Mageia is a RPM based distro. You should look at wiki for adding repositories, installing/removing software.
tarakbumba
 
Posts: 138
Joined: Apr 6th, '11, 22:50

Re: [Solved] sudo configuration and question about apt-get

Postby archp2008 » May 29th, '14, 18:48

Yes, it was only last night I found out that Mageia is not a Ubuntu-based derivative. I did not know it was RPM based either. Thanks for your help and patience.
archp2008
 
Posts: 40
Joined: Jan 28th, '14, 04:16


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest