Difference between pages "Package:Sudo" and "Install/pt-br/Kernel"

(Difference between pages)
m (a bit better, needs individual commands saving what i've got so far)
 
 
Line 1: Line 1:
{{Ebuild
+
<noinclude>
|Summary=Allows users or groups to run commands as other users
+
{{InstallPart|Kernel Installation}}
|CatPkg=app-admin/sudo
+
</noinclude>
|Homepage=http://www.sudo.ws/
+
=== Kernel ===
}}
+
{{PageNeedsUpdates}}
+
  
sudo allows privilege escalation for non root users to perform restricted actions while in a locked down user environment.
+
Starting mid-May 2015, Funtoo Linux stage3's include a pre-built {{c|debian-sources}} kernel to make installation faster and easier. To see if debian-sources is installed, type:
  
=== Emerge ===
+
{{console|body=
{{console|body=###i## emerge sudo}}
+
(chroot) # ##i##emerge -s debian-sources
 +
Searching...   
 +
[ Results for search key : ##b##debian-sources##!b## ]
 +
[ Applications found : ##b##1##!b## ]
  
==== Configuration ====
+
*  ##b##sys-kernel/debian-sources##!b##
===== /etc/sudoers.d/ =====
+
      ##g##Latest version available:##!g## 3.19.3
Instead of editing {{f|/etc/sudoers}}, you may drop individual configuration files into the {{f|/etc/sudoers.d/}} directory
+
      ##g##Latest version installed:##!g## 3.19.3
 
+
      ##g##Size of files:##!g## 81,292 kB
===== Passwordless Sudoer =====
+
      ##g##Homepage:##!g##      http://www.debian.org
The sudo configuration file is located @ {{f|/etc/sudoers}}. When editing this file be very careful to not introduce syntax errors.  Several other linux distributions use {{c|visudo}} to edit {{f|/etc/sudoers}}.
+
      ##g##Description:##!g##  Debian Sources (and optional binary kernel)
 
+
      ##g##License:##!g##      GPL-2
{{Console|body=$##i## su -c 'nano /etc/sudoers'}}
+
 
+
{{file|name=/etc/sudoers|lang=|desc=uncomment wheel group no password sudo|body=
+
%wheel ALL=(ALL) NOPASSWD: ALL
+
 
}}
 
}}
  
Add your user to the wheel group to enable sudo:
+
If a version is listed under {{c|Latest version installed}}, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the [[#Installing a Bootloader|Installing a Bootloader section]].
 
+
{{Console|body=$##i## su -c 'gpasswd -a $USER wheel'}}
+
 
+
Either log out, and in again or restart:
+
 
+
{{Console|body=$##i## su -c 'shutdown -r now'}}
+
 
+
===== Disabling Root Access By Password =====
+
To better secure a system, one may desire to disable root logins by password.
+
 
+
{{console|body= $##i## sudo passwd -ld root}}
+
  
to access root:
+
==== Building the Kernel ====
  
{{Console|body= $##i## sudo su}}
+
If you need to build a kernel for Funtoo Linux, please follow these steps:
  
Root can also be accessed by logging in via ssh keys, or as a restricted user then sudo su as above.
+
{{Fancynote|1=
 +
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}
  
====Bash Completion====
+
{{fancyimportant|1=
 +
<code>debian-sources</code> with <code>binary</code> USE flag requires at least 14GB free in <code>/var/tmp</code> and takes around 1 hour to build on a Intel Core i7 Processor.}}
  
Users that want bash completion with sudo need to run this once.
+
Let's emerge our kernel:
  
{{console|body=$##i## echo "complete -cf sudo" >> $HOME/.bashrc}}
+
<console>
 +
(chroot) # ##i##emerge debian-sources
 +
</console>
  
==== Passing Environment Variables ====
+
Once <code>emerge</code> completes, you'll have a brand new kernel and initramfs installed to <code>/boot</code>, plus kernel headers installed in <code>/usr/src/linux</code>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.
To pass environment variables to the temporary root use the -E flag.
+
{{console|body=$##i## sudo -E echo 'hello world'}}
+
  
==== Passing Aliases ====
+
{{fancynote|NVIDIA card users: the <code>binary</code> USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under <code>/etc/modprobe.d/</code>.}}
If your user has aliases you wish to use under sudo you must alias sudo with a space first:
+
{{console|body=$##i## echo "alias sudo='sudo '" >> $HOME/.bashrc}}
+
  
{{EbuildFooter}}
+
{{fancynote|For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. There may be modules that the Debian kernel doesn't include, a situation where [http://www.funtoo.org/wiki/Funtoo_Linux_Kernels#Using_Debian-Sources_with_Genkernel genkernel] would be useful. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information.}}

Revision as of 19:06, May 28, 2015


Note

This is a template that is used as part of the Installation instructions which covers: Kernel Installation. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.


Kernel

Starting mid-May 2015, Funtoo Linux stage3's include a pre-built debian-sources kernel to make installation faster and easier. To see if debian-sources is installed, type:

(chroot) # emerge -s debian-sources
Searching...    
[ Results for search key : debian-sources ]
[ Applications found : 1 ]

*  sys-kernel/debian-sources
      Latest version available: 3.19.3
      Latest version installed: 3.19.3
      Size of files: 81,292 kB
      Homepage:      http://www.debian.org
      Description:   Debian Sources (and optional binary kernel)
      License:       GPL-2


If a version is listed under Latest version installed, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the Installing a Bootloader section.

Building the Kernel

If you need to build a kernel for Funtoo Linux, please follow these steps:

Note

See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources for new users.

Important

debian-sources with binary USE flag requires at least 14GB free in /var/tmp and takes around 1 hour to build on a Intel Core i7 Processor.

Let's emerge our kernel:

(chroot) # emerge debian-sources

Once emerge completes, you'll have a brand new kernel and initramfs installed to /boot, plus kernel headers installed in /usr/src/linux, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.

Note

NVIDIA card users: the binary USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under /etc/modprobe.d/.

Note

For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. There may be modules that the Debian kernel doesn't include, a situation where genkernel would be useful. Also be sure to see hardware compatibility information.