Page 1 of 1

[Solved] sudo configuration and question about apt-get

PostPosted: May 28th, '14, 00:33
by archp2008
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?

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 01:16
by doktor5000
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

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 03:04
by archp2008
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?

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 03:14
by archp2008
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?

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 03:27
by archp2008
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 ~]$

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 03:52
by benmc
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

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 05:19
by archp2008
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.

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 06:13
by benmc
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.

Re: sudo configuration and question about apt-get

PostPosted: May 28th, '14, 06:55
by doktor5000
I've split it into a new thread.

Re: Error mounting partition for Mageia 4

PostPosted: May 28th, '14, 07:01
by doktor5000
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.

Re: sudo configuration and question about apt-get

PostPosted: May 29th, '14, 03:11
by archp2008
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.

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

PostPosted: May 29th, '14, 03:37
by archp2008
I went back to Control Center and found that the printer installed successfully.

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

PostPosted: May 29th, '14, 04:21
by benmc
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.

Re: sudo configuration and question about apt-get

PostPosted: May 29th, '14, 15:24
by tarakbumba
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.

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

PostPosted: May 29th, '14, 18:48
by archp2008
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.