Strony: [1]
Drukuj
Autor Wątek: Sudo.... Wielki problem :/ Nie można zalogować roota.  (Przeczytany 775 razy)
0 użytkowników i 1 Gość przegląda ten wątek.
piekarz139
Miętowe nasionko
*

Reputacja 0
Offline Offline

Distro: Mint 10
Wiadomości: 7


Zobacz profil
« : Grudzień 18, 2010, 12:22:09 »

Witam. Kiedy próbuje zalogować się na konto roota otrzymuje z konsoli następujący error
Mój system to Mint 10

Cytuj
sudo -i
sudo: can't open /etc/sudoers.d/README: Permission denied
>>> /etc/sudoers: /etc/sudoers.d/README near line 23 <<<
sudo: parse error in /etc/sudoers near line 23
sudo: no valid sudoers sources found, quitting

Przekopałem całe google i nie znalazłem odpowiedzi :/ W ostateczności postanowiłem napisać tutaj. Z góry dziękuje za pomoc.
Zapisane
sir_lucjan
Człowiek Demolka
Prawie jak Admin
Miętowa plantacja
*******

Reputacja 1
Offline Offline

Płeć: Mężczyzna
Distro: Debian testing x86_64
Wiadomości: 2460


"Jak Polska cała, nic nigdzie nie działa!"


Zobacz profil
« Odpowiedz #1 : Grudzień 18, 2010, 12:27:46 »

Odradzam logowanie się na roota, to bardzo niebezpieczne. Wystarczy jak używasz sudo do instalowania, aktualizacji czy usuwania pakietów.

Zapisane

Toshiba Satellite C660-1QC || Linux Register User: #536661

piekarz139
Miętowe nasionko
*

Reputacja 0
Offline Offline

Distro: Mint 10
Wiadomości: 7


Zobacz profil
« Odpowiedz #2 : Grudzień 18, 2010, 12:29:37 »

Ale nawet do tego nie mogę. :/ Wpisuje   sudo apt-get install .... no i jest ten sam błąd Smutny
Dodany: Grudzień 18, 2010, 12:34:27
Cokolwiek próbuje robić z komendą "sudo"  wywala mi ten sam error :/
« Ostatnia zmiana: Grudzień 18, 2010, 12:34:27 wysłana przez piekarz139 » Zapisane
Forum Linux Mint
« Odpowiedz #2 : Grudzień 18, 2010, 12:29:37 »

 Zapisane
sir_lucjan
Człowiek Demolka
Prawie jak Admin
Miętowa plantacja
*******

Reputacja 1
Offline Offline

Płeć: Mężczyzna
Distro: Debian testing x86_64
Wiadomości: 2460


"Jak Polska cała, nic nigdzie nie działa!"


Zobacz profil
« Odpowiedz #3 : Grudzień 18, 2010, 12:35:35 »

Instalowałeś coś? Robiłeś jakieś eksperymenty?
Zapisane

Toshiba Satellite C660-1QC || Linux Register User: #536661

piekarz139
Miętowe nasionko
*

Reputacja 0
Offline Offline

Distro: Mint 10
Wiadomości: 7


Zobacz profil
« Odpowiedz #4 : Grudzień 18, 2010, 12:39:01 »

Zainstalowałem grę frets on fire... Później nie odczytywała plików to ktoś mi poradził abym dla partycji "system plików" Ustawił pełne prawa dla wszystkich do wszystkiego. System nie wstawał były jakieś błędy więc dostałem poradę aby wejść w tryb ratunkowy i z roota wykonać  "chmod 1777 /tmp" oraz "chmod -R 0440 /etc/sudoers" . Więc tak zrobiłem i teraz mam problem. Myślałem że ten ktoś się zna ale chyba przekombinował :/
Zapisane
sir_lucjan
Człowiek Demolka
Prawie jak Admin
Miętowa plantacja
*******

Reputacja 1
Offline Offline

Płeć: Mężczyzna
Distro: Debian testing x86_64
Wiadomości: 2460


"Jak Polska cała, nic nigdzie nie działa!"


Zobacz profil
« Odpowiedz #5 : Grudzień 18, 2010, 12:47:00 »

Zobacz czy masz coś takiego jak dałem w poradzie:

http://forum.linuxmint.pl/index.php/topic,1864.0.html

Najpierw

Kod:
su

hasło roota

Kod:
gedit /etc/sudoers
Kod:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Prevent environment variables from influencing programs in an
# unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)
Defaults always_set_home
Defaults env_reset
# Change env_reset to !env_reset in previous line to keep all environment variables
# Following list will no longer be necessary after this change

Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
# Comment out the preceding line and uncomment the following one if you need
# to use special input methods. This may allow users to compromise  the root
# account if they are allowed to run commands without authentication.
#Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"

# In the default (unconfigured) configuration, sudo asks for the root password.
# This allows use of an ordinary user account for administration of a freshly
# installed system. When configuring sudo, delete the two
# following lines:
Defaults targetpw   # ask for the password of the target user i.e. root
ALL ALL=(ALL) ALL   # WARNING! Only use this together with 'Defaults targetpw'!

# Runas alias specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

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

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

Dodajemy odpowiednią linijkę na samym końcu:

Kod:
nasza_nazwa_użytkownika ALL=(ALL) ALL

Czyli powinniśmy otrzymać coś takiego:

Kod:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Prevent environment variables from influencing programs in an
# unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)
Defaults always_set_home
Defaults env_reset
# Change env_reset to !env_reset in previous line to keep all environment variables
# Following list will no longer be necessary after this change

Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
# Comment out the preceding line and uncomment the following one if you need
# to use special input methods. This may allow users to compromise  the root
# account if they are allowed to run commands without authentication.
#Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"

# In the default (unconfigured) configuration, sudo asks for the root password.
# This allows use of an ordinary user account for administration of a freshly
# installed system. When configuring sudo, delete the two
# following lines:
Defaults targetpw   # ask for the password of the target user i.e. root
ALL ALL=(ALL) ALL   # WARNING! Only use this together with 'Defaults targetpw'!

# Runas alias specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

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

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

nasza_nazwa_użytkownika ALL=(ALL) ALL

Jeśli masz coś takiego, to w tym pliku jest wszystko prawidłowe.

U ciebie może wyglądać to odrobinkę inaczej - ty masz Minta, ja openSUSE.
Zapisane

Toshiba Satellite C660-1QC || Linux Register User: #536661

piekarz139
Miętowe nasionko
*

Reputacja 0
Offline Offline

Distro: Mint 10
Wiadomości: 7


Zobacz profil
« Odpowiedz #6 : Grudzień 18, 2010, 01:02:54 »

Podczas otwierania w gedicie
Cytuj
gedit /etc/sudoers
/usr/share/themes/exotic/gtk-2.0/gtkrc:89: Murrine configuration option "gradients" is no longer supported and will be ignored.
/usr/share/themes/exotic/gtk-2.0/gtkrc:89: Murrine configuration option "highlight_ratio" will be deprecated in future releases. Please use "highlight_shade" instead.
/usr/share/themes/exotic/gtk-2.0/gtkrc:90: Murrine configuration option "lightborder_ratio" will be deprecated in future releases. Please use "lightborder_shade" instead.
/usr/share/themes/exotic/gtk-2.0/gtkrc:156: Murrine configuration option "highlight_ratio" will be deprecated in future releases. Please use "highlight_shade" instead.

(gedit:9098): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported

**
GLib-GIO:ERROR:/build/buildd/glib2.0-2.26.0/gio/gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL)
Aborted
Zapisane
sir_lucjan
Człowiek Demolka
Prawie jak Admin
Miętowa plantacja
*******

Reputacja 1
Offline Offline

Płeć: Mężczyzna
Distro: Debian testing x86_64
Wiadomości: 2460


"Jak Polska cała, nic nigdzie nie działa!"


Zobacz profil
« Odpowiedz #7 : Grudzień 18, 2010, 01:05:28 »

http://forum.dobreprogramy.pl/nadalem-wszystkim-plikom-chmod-777-jak-naprawic-t364452.html
Zapisane

Toshiba Satellite C660-1QC || Linux Register User: #536661

piekarz139
Miętowe nasionko
*

Reputacja 0
Offline Offline

Distro: Mint 10
Wiadomości: 7


Zobacz profil
« Odpowiedz #8 : Grudzień 18, 2010, 01:14:49 »

Mój plik sudoers wygląda tak
Cytuj
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults        env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

piekarz ALL=(ALL) ALL

Czy wszystko jest OK? Tak ma być? Zrobiłem wszystko. Dosłownie wszystko i nadal to samo :/
Zapisane
sir_lucjan
Człowiek Demolka
Prawie jak Admin
Miętowa plantacja
*******

Reputacja 1
Offline Offline

Płeć: Mężczyzna
Distro: Debian testing x86_64
Wiadomości: 2460


"Jak Polska cała, nic nigdzie nie działa!"


Zobacz profil
« Odpowiedz #9 : Grudzień 18, 2010, 01:15:40 »

A ten link który dałem?
Zapisane

Toshiba Satellite C660-1QC || Linux Register User: #536661

piekarz139
Miętowe nasionko
*

Reputacja 0
Offline Offline

Distro: Mint 10
Wiadomości: 7


Zobacz profil
« Odpowiedz #10 : Grudzień 18, 2010, 01:17:56 »

Ten link... też nic nie pomaga Smutny

Dodany: Grudzień 18, 2010, 01:20:35
Wolałbym uniknąć reinstalacji systemu... Po pierwsze mam dużo danych. Po drugie peeeełno ustawień. Nie chcę znów stracić pół dnia na ustawianie i instalowanie wszystkiego. A bardzo zależy mi na czasie.
« Ostatnia zmiana: Grudzień 18, 2010, 01:20:35 wysłana przez piekarz139 » Zapisane
eskimoss
Miętowy krzew
****

Reputacja 0
Offline Offline

Płeć: Mężczyzna
Distro: Mint 11 Katya Gnome2
Wiadomości: 322



Zobacz profil
« Odpowiedz #11 : Grudzień 18, 2010, 11:15:46 »

Zainstalowałem grę frets on fire... Później nie odczytywała plików to ktoś mi poradził abym dla partycji "system plików" Ustawił pełne prawa dla wszystkich do wszystkiego.
Ten ktoś powinien dostać kopa. Dając takie uprawnienia bardzo osłabiasz bezpieczeństwo systemu. Ograniczenie uprawnień do niezbędnego minimum to podstawa bezpieczeństwa Linuksa. Powinieneś rozumieć co robisz.

Mój sudoers wygląda tak:
Kod:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults timestamp_timeout = 0

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root   ALL=(ALL) ALL

# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Jedyne co w nim zmieniłem to tylko Defaults timestamp_timeout = 0 żeby nie trzymał aktywnego hasła. Ale to możesz zmienić na 5 czy 15 minut.
Możesz ten plik edytować z pod live cd np. Parted magic, po zamontowaniu partycji systemowej.
Poza tym wejdź w Centrum oprogramowania -> Użytkownicy i grupy i sprawdź jakie twój użytkownik ma uprawnienia, czy należy do grupy admin. # Members of the admin group may gain root privileges

Edit:
Nie przyjrzałem się wcześniej twojemu sudoers. Wygląda w porządku, chociaż ja bym usunął 'piekarz ALL=(ALL) ALL' i zrobił domyślne ustawienia. Chociaż i tak podobno w Mint hasło sudo jest takie samo jak użytkownika.
No i jeszcze zobacz czy nie zmieniły się same uprawnienia tego pliku /etc/sudoers.
Dodatkowo tu masz więcej informacji o sudoers:
http://ubuntuforums.org/showthread.php?t=1132821
https://help.ubuntu.com/community/Sudoers
https://help.ubuntu.com/community/RootSudo
Teraz sprawdź do jakich grup należy twój użytkownik.
« Ostatnia zmiana: Grudzień 18, 2010, 11:47:14 wysłana przez eskimoss » Zapisane
Strony: [1]
Drukuj
Skocz do: