openSUSE > Asennus ja käyttö

SUDO ongelmia

(1/2) > >>

Owdy:
Kokeilin Yastista sitä SUDO osiota koska haluaisin sen pelaavan samalla tavalla kuin Ubuntussa. En kuitenkaan tallentanut mitään (tietääkseni), mutta nyt en enää pääse tekemään mitään ylläpitohommia. Jos annan rootin passun, saan vastaukseksi 'Keskustelu "su"-ohjelman kanssa epäonnistui.'.

Toinen ongelma:

--- Koodia: ---osku@dhcppc0:~> sudo echo testi
osku's password:
osku is not in the sudoers file.  This incident will be reported.
--- Koodi päättyy ---
Eikös sen pitäs kysyä rootin passua eikä mun? Mitähän mä oon nyt sekoillut.

Ruuttina pystyn kirjautumaan kyllä, mutta muuten se ei pelitä. Mitens tätä lähtis purkamaan?

etc/sudoers:

--- Koodia: ---# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# 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

# Runas alias specification

# User privilege specification
root ALL = (ALL) ALL

--- Koodi päättyy ---

Owdy:
Ratkes lisäämällä nämä rivit suodoers tiedostoon:


--- Koodia: ---# 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'!
--- Koodi päättyy ---

juippis:
Itse laittaisin vain
osku ALL=(ALL) ALL

jolloin oikeudet olisi vain osku-käyttäjällä. Noin se taitaa kysyä tästä lähtien sitten sinun salasanaasi.

Owdy:
Kokeilin tolla, mutta se ei pelitä kun mun omalla puolella. Jos kokeilen avaa esim Yastia vaimon istunnossa, se sanoo että passu on väärä. Ei kelpaa mun eikä rootin. Kokeilin myös ottaa sudo osion pois, ei auta.

--- Koodia: ---# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# 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
osku ALL = (ALL) ALL

# User privilege specification
root ALL = (ALL) ALL
--- Koodi päättyy ---

jmp:
Komenna joko
su -c 'rug in yast2-sudo'
tai
su -c 'zypper in yast2-sudo'

kun tuo on asentunut, avaa YaST2 -> Tietoturva ja käyttäjät -> Sudo
Muokkaa tuon kautta toimivuus haluamaksesi.

Navigaatio

[0] Viestien etusivu

[#] Seuraava sivu

Siirry pois tekstitilasta