Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Risolto] problemi con sudo e su
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Wed Jun 26, 2013 7:17 am    Post subject: [Risolto] problemi con sudo e su Reply with quote

Ciao a tutti,
dopo un po' di giorni che non utilizzavo Gentoo, mi sono accorto ieri sera che sudo mi restituisce questo:
Code:
giulio@miogentoo ~ $ sudo su
sudo: lo uid effettivo non è 0. Il programma sudo è installato con
setuid root?
giulio@miogentoo ~ $


mentre su -, mi da' questo
Code:
 su -
Password:
setgid: Operazione non permessa
giulio@miogentoo ~ $


in pratica ora no posso piu' nemmeno spegnere il pc ...

Ho provato a seguire qualche suggerimento in rete, ma senza successo.
Se puo' servire posto qualche info sui permessi:
Code:
giulio@miogentoo ~ $ ls -la /usr/bin/sudo
-rws--x--x 1 giulio users 114968 20 apr 16.04 /usr/bin/sudo
giulio@miogentoo ~ $
e che
Code:
ls -al /bin/su
-rwsr-xr-x 1 giulio users 30992 13 dic  2012 /bin/su




Non avendo neanche molto tempo a disposizione per ulteriori approfondimenti, vi pregherei per un piccolo aiuto. Grazie


Last edited by Hal-10000 on Wed Jul 10, 2013 4:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Wed Jun 26, 2013 8:27 pm    Post subject: Reply with quote

piccolo aggiornamento:

da root in tty ho dato i seguenti comandi:

Code:
chmod u+s /usr/bin/sudo
chown root:root /usr/bin/sudo
chmod 4111 /usr/bin/sudo


cosi ho risolto il problema di cui sopra, ma ne e' poi uscito fuori un altro (che pero' non ho annotato, scusate), per cui ho dato:
Code:
pk chown root /usr/lib/sudo/sudoers.so #senza risultato

chown root  /usr/lib/sudo/sudoers.so

chmod 0040 /etc/sudoers


adesso ho questo output
Code:
sudo: /etc/sudoers è di proprietà dello uid 1000, dovrebbe essere di 0
sudo: nessuna sorgente valida di sudoers trovata, uscita
sudo: impossibile inizializzare il plugin delle politiche


che non sono ancora riuscito a risolvere.

qualche idea?
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Thu Jun 27, 2013 11:34 am    Post subject: Reply with quote

Domanda : hai provato a modificare il file /etc/sudoers per impostare (o meglio negare) la richiesta password per le operazioni di merge etc prima di tutto questo fattaccio ???


Inoltre la mossa di cambiare gruppo/GUID/SUID al comando "sudo" così tanto per provare potrebbe portare a qualche problemino di gestione :D come non capisco l'utilizzo di "sudo su"

o si va di "su" (Switch-User) che permette di passsare da un utente all'altro

o si utilizza "sudo" per dare i privilegi di amministrazione (restrittivi o no ... vedi /etc/sudoers) all'utente che ne fa richiesta.

reinstalla "sudo" e dai un etc-update (-5) per sovvrascrivere il file di configurazion e originale magari accedendo ad una tty

ciauz
Back to top
View user's profile Send private message
pingoo
Guru
Guru


Joined: 11 Jul 2006
Posts: 324

PostPosted: Thu Jun 27, 2013 12:12 pm    Post subject: Reply with quote

Sicuro non fosse un problema di appartenza ad un gruppo (wheel)?
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Jun 27, 2013 4:16 pm    Post subject: Reply with quote

Ringrazio innanzi tutto per le risposte.

sabayonino wrote:
Domanda : hai provato a modificare il file /etc/sudoers per impostare (o meglio negare) la richiesta password per le operazioni di merge etc prima di tutto questo fattaccio ???
assolutamente no. Come detto all'inizio, era qualche giorno che non avviavo Gentoo, percio' il file sudoers non lo ho affatto modificato


sabayonino wrote:
Inoltre la mossa di cambiare gruppo/GUID/SUID al comando "sudo" così tanto per provare potrebbe portare a qualche problemino di gestione :D come non capisco l'utilizzo di "sudo su"

o si va di "su" (Switch-User) che permette di passsare da un utente all'altro

o si utilizza "sudo" per dare i privilegi di amministrazione (restrittivi o no ... vedi /etc/sudoers) all'utente che ne fa richiesta.
e' vero, e' un'abitudine che mi porto dietro da altre distro. Ma, cerchero' di approfondire.

sabayonino wrote:
reinstalla "sudo" e dai un etc-update (-5) per sovvrascrivere il file di configurazion e originale magari accedendo ad una tty ciauz
Ho provato a reinstallare sudo, ma al termine etc-update mi dice che non c'e' nulla da cambiare.
posto qui http://pastebin.com/eJiJBYfE l'output finale di
Code:
sudo emerge -av sudo
e di
Code:
etc-update


comunque non ho capito quando dice:
Code:
 sudo uses the /etc/ldap.conf.sudo file for ldap configuration.
 *
 * To use the -A (askpass) option, you need to install a compatible
 * password program from the following list. Starred packages will
 * automatically register for the use with sudo (but will not force
 * the -A option):
 *
 *  [*] net-misc/ssh-askpass-fullscreen
 *      net-misc/x11-ssh-askpass
 *
 * You can override the choice by setting the SUDO_ASKPASS environmnent
 * variable to the program you want to use.


Quindi purtroppo il problema persiste. :roll:


Last edited by Hal-10000 on Thu Jun 27, 2013 4:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Jun 27, 2013 4:31 pm    Post subject: Reply with quote

pingoo wrote:
Sicuro non fosse un problema di appartenza ad un gruppo (wheel)?

non saprei..comunque questo e' l'output di
Code:
cat /etc/sudoers > /home/giulio/sudoers
http://pastebin.com/aKgv83DY
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Jun 27, 2013 4:56 pm    Post subject: Reply with quote

e se per risolvere il problema di proprieta' che esce fuori qui
Code:
giulio@miogentoo ~ $ sudo etc-update
sudo: /etc/sudoers.d è di proprietà dello uid 1000, dovrebbe essere di 0
sudo: /var/db/sudo è di proprietà dell'uid 1000, dovrebbe essere dell'uid 0

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
Scanning Configuration files...
Exiting: Nothing left to do; exiting. :)
giulio@miogentoo ~ $

provassi
Code:
chown -R root:wheel /etc/sudoers


cosa ne pensate?
Back to top
View user's profile Send private message
doom555
n00b
n00b


Joined: 29 Oct 2012
Posts: 57

PostPosted: Thu Jun 27, 2013 8:30 pm    Post subject: Reply with quote

Il tuo problema è che i files /etc/passwd e /etc/group non appartengono all'utente root che ha l'uid 0, invece appartengono all'utente con l'uid 1000 (in genere è l'utente non privilegiato che hai aggiunto).

/etc/passwd wrote:
root:x:0:0:root:/root:/bin/bash


Code:

# ls -al /etc/passwd
-rw-r--r-- 1 root root 2343 29 mar 20.31 /etc/passwd
# ls -al /etc/group
-rw-r--r-- 1 root root 943  1 dic  2012 /etc/group
Back to top
View user's profile Send private message
pierino_89
Guru
Guru


Joined: 03 Oct 2009
Posts: 522

PostPosted: Thu Jun 27, 2013 9:58 pm    Post subject: Reply with quote

Penso che ti sia scappato di mano un "chown -R" o qualcosa del genere, e di conseguenza i permessi dell'intero sistema sono andati a donnine di facili costumi :P

Controlla in che stato è il tuo sistema con:
Code:
find /lib /usr/ /etc /sbin /bin -group users -or -user giulio

Ci sarebbero altre cartelle da controllare, ma così già dovresti farti un'idea. In un sistema "sano" non dovrebbe uscire nulla (o quasi).
_________________
Linux registered user 461710
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Jun 27, 2013 10:50 pm    Post subject: Reply with quote

pierino_89 wrote:
Penso che ti sia scappato di mano un "chown -R" o qualcosa del genere, e di conseguenza i permessi dell'intero sistema sono andati a donnine di facili costumi :P

Controlla in che stato è il tuo sistema con:
Code:
find /lib /usr/ /etc /sbin /bin -group users -or -user giulio

Ci sarebbero altre cartelle da controllare, ma così già dovresti farti un'idea. In un sistema "sano" non dovrebbe uscire nulla (o quasi).


Intanto, ringrazio tutti per le risposte.

Probabilmente hai ragione perche' dal comando che hai postato e' uscita un'infinita' di roba. Quindi immagino che il danno sia grave.
C'e' modo di rimediare almeno in parte, o per il momento solo per cio' che e' piu necessario?
Si tratterebbe di restituire i permessi giusti. bella rogna...


Last edited by Hal-10000 on Thu Jun 27, 2013 10:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Jun 27, 2013 10:55 pm    Post subject: Reply with quote

doom555 wrote:
Il tuo problema è che i files /etc/passwd e /etc/group non appartengono all'utente root che ha l'uid 0, invece appartengono all'utente con l'uid 1000 (in genere è l'utente non privilegiato che hai aggiunto).

/etc/passwd wrote:
root:x:0:0:root:/root:/bin/bash


Code:

# ls -al /etc/passwd
-rw-r--r-- 1 root root 2343 29 mar 20.31 /etc/passwd
# ls -al /etc/group
-rw-r--r-- 1 root root 943  1 dic  2012 /etc/group



mi sa che hai ragione:

Code:
giulio@miogentoo ~ $ ls -al /etc/passwd
-rw-r--r-- 1 giulio users 1301 29 mag 20.22 /etc/passwd

Code:
giulio@miogentoo ~ $ ls -al /etc/group
-rw-r--r-- 1 giulio users 594 29 mag 20.22 /etc/group
giulio@miogentoo ~ $
Back to top
View user's profile Send private message
pierino_89
Guru
Guru


Joined: 03 Oct 2009
Posts: 522

PostPosted: Thu Jun 27, 2013 11:22 pm    Post subject: Reply with quote

[quote="Hal-10000"]
pierino_89 wrote:

Probabilmente hai ragione perche' dal comando che hai postato e' uscita un'infinita' di roba. Quindi immagino che il danno sia grave.
C'e' modo di rimediare almeno in parte, o per il momento solo per cio' che e' piu necessario?
Si tratterebbe di restituire i permessi giusti. bella rogna...


Per fare un lavoro ben fatto dovresti reinstallare, però qualcosa si può fare, per esempio il contenuto di /etc, /bin, /sbin e /lib è quasi tutto root:root.
Sono diversi solo questi (ovviamente non abbiamo gli stessi pacchetti installati e potrebbe cambiare qualcosa):
Code:
# find /etc /bin /sbin /lib -not -group root -or -not -user root | xargs ls -ld
drwxr-x--- 2 root     video         4096  1 ott  2012 /etc/VirtualGL
drwxr-xr-x 5 root     lp            4096 20 mag 15.52 /etc/cups
-rw------- 1 root     lp             128  3 apr 15.19 /etc/cups/classes.conf
-rw-r----- 1 root     lp             128  3 apr 15.18 /etc/cups/classes.conf.O
-rw-r----- 1 root     lp            3000 20 mag 15.04 /etc/cups/cups-files.conf
-rw-r----- 1 root     lp            4484 20 mag 15.04 /etc/cups/cupsd.conf
-rw-r----- 1 root     lp            3165 28 feb 15.07 /etc/cups/cupsd.conf.O
drwxr-xr-x 2 root     lp            4096 20 mag 15.05 /etc/cups/ppd
-rw------- 1 root     lp            2806 15 mag 14.54 /etc/cups/printers.conf
-rw------- 1 root     lp            2383 15 mag 14.52 /etc/cups/printers.conf.O
-rw-r----- 1 root     lp             278 20 mag 15.04 /etc/cups/snmp.conf
drwx------ 2 root     lp            4096 20 mag 15.05 /etc/cups/ssl
-rw------- 1 root     lp            1001 30 ago  2009 /etc/cups/ssl/server.crt
-rw------- 1 root     lp             887 30 ago  2009 /etc/cups/ssl/server.key
-rw-r----- 1 root     lp             113 29 apr 23.32 /etc/cups/subscriptions.conf
-rw-r----- 1 root     lp             113  4 apr 14.53 /etc/cups/subscriptions.conf.O
-rw------- 1 polkitd          1018  5323 15 gen  2011 /etc/ddclient/ddclient.conf
-rw------- 1 ddclient ddclient      5855 29 giu  2012 /etc/ddclient/ddclient.conf.sample
-rw-r----- 1 root     games           80  7 giu 02.01 /etc/env.d/90games
drwxr-x--- 3 root     games         4096 12 ott  2012 /etc/games
drwxr-x--- 4 root     games         4096 18 mar 18.09 /etc/games/sdlmame
drwxr-x--- 2 root     games         4096 18 mar 18.09 /etc/games/sdlmame/cheats
-rw-r----- 1 root     games            0 18 mar 18.08 /etc/games/sdlmame/cheats/.keep_games-emulation_sdlmame-0
drwxr-x--- 2 root     games         4096 18 mar 18.09 /etc/games/sdlmame/ctrlr
-rw-r----- 1 root     games            0 18 mar 18.08 /etc/games/sdlmame/ctrlr/.keep_games-emulation_sdlmame-0
-rw-r----- 1 root     games         6717 13 ott  2012 /etc/games/sdlmame/mame.ini
-rw-r----- 1 root     games          116 18 mar 18.08 /etc/games/sdlmame/vector.ini
drwx------ 2 polkitd  root          4096 20 mag 16.00 /etc/polkit-1/rules.d
-rw-r--r-- 1 polkitd  root           321 20 mag 15.54 /etc/polkit-1/rules.d/50-default.rules
-rw-r--r-- 1 polkitd  root           733 19 dic  2012 /etc/polkit-1/rules.d/60-gparted.rules
-rw-r----- 1 root     mail         16384 29 giu  2012 /etc/sasl2/sasldb2
-rw-r----- 1 root     ssmtp         1576 22 gen  2011 /etc/ssmtp/ssmtp.conf
drwxr-xr-x 3      999 pulse-access  4096  7 giu 21.09 /etc/syslog-ng
drwxr-xr-x 2      999 pulse-access  4096  7 giu 01.43 /etc/syslog-ng/patterndb.d


In /usr la cosa è più complessa, /usr/portage dovrebbe essere tutta portage:portage, per il resto vedo
Code:
find /usr/[a-o]* -not -group root -or -not -user root | xargs ls -ld
-rwxr-s--x 1 root   crontab       35928 28 giu  2012 /usr/bin/crontab
-rwxr-s--x 1 root   mail          14656 29 giu  2012 /usr/bin/dotlockfile
-rwxr-x--- 1 root   wireshark     85552 16 giu 12.41 /usr/bin/dumpcap
-rwx--s--x 1 root   locate        35328 12 nov  2012 /usr/bin/locate
-rws--x--x 1 man    root         100360 27 giu 14.02 /usr/bin/man
-rws--x--x 1 man    root         122680 27 giu 14.02 /usr/bin/mandb
-rws--x--x 1 root   wheel         14656 14 mar 19.13 /usr/bin/netselect
-rwxr-s--x 1 root   utmp         358792 15 nov  2012 /usr/bin/screen
drwxr-xr-x 3 games  root           4096 18 mar 18.09 /usr/games
drwxr-x--- 2 root   games          4096  7 giu 02.01 /usr/games/bin
-rwxr-x--- 1 root   games        262568 17 feb 10.05 /usr/games/bin/advcfg
-rwxr-x--- 1 root   games         94304 17 feb 10.05 /usr/games/bin/advj
-rwxr-x--- 1 root   games         95104 17 feb 10.05 /usr/games/bin/advk
-rwxr-x--- 1 root   games         93952 17 feb 10.05 /usr/games/bin/advm
-rwxr-x--- 1 root   games      36440096 17 feb 10.05 /usr/games/bin/advmame
-rwxr-x--- 1 root   games       1173576 19 gen 15.24 /usr/games/bin/advmenu
-rwxr-x--- 1 root   games        128968 17 feb 10.05 /usr/games/bin/advs
-rwxr-x--- 1 root   games        258280 17 feb 10.05 /usr/games/bin/advv
-rwxr-x--- 1 root   games        332696  5 dic  2012 /usr/games/bin/atanks
-rwxr-x--- 1 root   games       3078264 12 nov  2012 /usr/games/bin/glob2
-rwxr-x--- 1 root   games       6917072 29 giu  2012 /usr/games/bin/gnugo
-rwxr-x--- 1 root   games       3855928  2 giu 05.20 /usr/games/bin/hedgewars
-rwxr-x--- 1 root   games       2059104  2 giu 05.18 /usr/games/bin/hwengine
-rwxr-x--- 1 root   games      19235584  7 giu 02.01 /usr/games/bin/scummvm
-rwxr-x--- 1 root   games      80932336 18 mar 18.08 /usr/games/bin/sdlmame
-rwxr-x--- 1 root   games       3376256 11 feb 20.55 /usr/games/bin/warzone2100
-rwxr-x--- 1 root   games      14172840 28 mar 14.51 /usr/games/bin/wesnoth
-rwxr-s--x 1 root   nogroup       52216  7 giu 02.24 /usr/lib64/kde4/libexec/kdesud
-rwxr-s--x 1 root   utmp          10112 26 nov  2012 /usr/lib64/misc/utempter/utempter
drwxr-xr-x 2 nobody root           4096 28 mar 14.19 /usr/lib64/nfs/sm
drwxr-xr-x 2 nobody root           4096 28 mar 14.19 /usr/lib64/nfs/sm.bak
-rw------- 1 nobody root              0 28 mar 14.18 /usr/lib64/nfs/state
-rwxr-x--- 1 root   vboxusers     30928 27 giu 14.27 /usr/lib64/virtualbox/DBGCPlugInDiggers.so
-rwxr-x--- 1 root   vboxusers      2931 27 giu 14.27 /usr/lib64/virtualbox/VBox
-rwxr-x--- 1 root   vboxusers     10288 27 giu 14.27 /usr/lib64/virtualbox/VBoxAuth.so
-rwxr-x--- 1 root   vboxusers     31224 27 giu 14.27 /usr/lib64/virtualbox/VBoxAuthSimple.so
-rwxr-x--- 1 root   vboxusers   1452952 27 giu 14.27 /usr/lib64/virtualbox/VBoxDD.so
-rwxr-x--- 1 root   vboxusers    162304 27 giu 14.27 /usr/lib64/virtualbox/VBoxDD2.so
-rwxr-x--- 1 root   vboxusers     18456 27 giu 14.27 /usr/lib64/virtualbox/VBoxDD2GC.gc
-rwxr-x--- 1 root   vboxusers     22496 27 giu 14.27 /usr/lib64/virtualbox/VBoxDD2R0.r0
-rwxr-x--- 1 root   vboxusers    141476 27 giu 14.27 /usr/lib64/virtualbox/VBoxDDGC.gc
-rwxr-x--- 1 root   vboxusers    166760 27 giu 14.27 /usr/lib64/virtualbox/VBoxDDR0.r0
-rwxr-x--- 1 root   vboxusers    360464 27 giu 14.27 /usr/lib64/virtualbox/VBoxDDU.so
-rwxr-x--- 1 root   vboxusers    110112 27 giu 14.27 /usr/lib64/virtualbox/VBoxDbg.so
-rwxr-x--- 1 root   vboxusers     47416 27 giu 14.27 /usr/lib64/virtualbox/VBoxDragAndDropSvc.so
-rw-r--r-- 1 root   vboxusers   1048576 27 giu 14.27 /usr/lib64/virtualbox/VBoxEFI32.fd
-rw-r--r-- 1 root   vboxusers   1048576 27 giu 14.27 /usr/lib64/virtualbox/VBoxEFI64.fd
-rwxr-x--- 1 root   vboxusers     56552 27 giu 14.27 /usr/lib64/virtualbox/VBoxExtPackHelperApp
-rwxr-x--- 1 root   vboxusers     18576 27 giu 14.27 /usr/lib64/virtualbox/VBoxGuestControlSvc.so
-rwxr-x--- 1 root   vboxusers     35056 27 giu 14.27 /usr/lib64/virtualbox/VBoxGuestPropSvc.so
-rws--x--- 1 root   vboxusers     26968 27 giu 14.27 /usr/lib64/virtualbox/VBoxHeadless
-rwxr-x--- 1 root   vboxusers    113600 27 giu 14.27 /usr/lib64/virtualbox/VBoxHeadless.so
-rwxr-x--- 1 root   vboxusers     18408 27 giu 14.27 /usr/lib64/virtualbox/VBoxHostChannel.so
-rwxr-x--- 1 root   vboxusers     68384 27 giu 14.27 /usr/lib64/virtualbox/VBoxKeyboard.so
-rwxr-x--- 1 root   vboxusers    806848 27 giu 14.27 /usr/lib64/virtualbox/VBoxManage
-rws--x--- 1 root   vboxusers     10464 27 giu 14.27 /usr/lib64/virtualbox/VBoxNetAdpCtl
-rws--x--- 1 root   vboxusers     26968 27 giu 14.27 /usr/lib64/virtualbox/VBoxNetDHCP
-rwxr-x--- 1 root   vboxusers     31016 27 giu 14.27 /usr/lib64/virtualbox/VBoxNetDHCP.so
-rwxr-x--- 1 root   vboxusers    155048 27 giu 14.27 /usr/lib64/virtualbox/VBoxOGLhostcrutil.so
-rwxr-x--- 1 root   vboxusers    152456 27 giu 14.27 /usr/lib64/virtualbox/VBoxOGLhosterrorspu.so
-rwxr-x--- 1 root   vboxusers    151776 27 giu 14.27 /usr/lib64/virtualbox/VBoxOGLrenderspu.so
-rwxr-x--- 1 root   vboxusers    221944 27 giu 14.27 /usr/lib64/virtualbox/VBoxPython.so
-rwxr-x--- 1 root   vboxusers    221944 27 giu 14.27 /usr/lib64/virtualbox/VBoxPython2_6.so
-rwxr-x--- 1 root   vboxusers    221944 27 giu 14.27 /usr/lib64/virtualbox/VBoxPython2_7.so
-rwxr-x--- 1 root   vboxusers    690336 27 giu 14.27 /usr/lib64/virtualbox/VBoxREM.so
-rwxr-x--- 1 root   vboxusers   1367184 27 giu 14.27 /usr/lib64/virtualbox/VBoxRT.so
-rws--x--- 1 root   vboxusers     26960 27 giu 14.27 /usr/lib64/virtualbox/VBoxSDL
-rwxr-x--- 1 root   vboxusers    171440 27 giu 14.27 /usr/lib64/virtualbox/VBoxSDL.so
-rwxr-x--- 1 root   vboxusers   2628384 27 giu 14.27 /usr/lib64/virtualbox/VBoxSVC
-rwxr-x--- 1 root   vboxusers     43472 27 giu 14.27 /usr/lib64/virtualbox/VBoxSharedClipboard.so
-rwxr-x--- 1 root   vboxusers    887000 27 giu 14.27 /usr/lib64/virtualbox/VBoxSharedCrOpenGL.so
-rwxr-x--- 1 root   vboxusers     35160 27 giu 14.27 /usr/lib64/virtualbox/VBoxSharedFolders.so
-rwxr-x--- 1 root   vboxusers     92832 27 giu 14.27 /usr/lib64/virtualbox/VBoxTestOGL
-rwxr-x--- 1 root   vboxusers     10360 27 giu 14.27 /usr/lib64/virtualbox/VBoxTunctl
-rwxr-x--- 1 root   vboxusers   2269512 27 giu 14.27 /usr/lib64/virtualbox/VBoxVMM.so
-rwxr-x--- 1 root   vboxusers     10376 27 giu 14.27 /usr/lib64/virtualbox/VBoxVMMPreload.so
-rwxr-x--- 1 root   vboxusers   1114288 27 giu 14.27 /usr/lib64/virtualbox/VBoxXPCOM.so
-rwxr-x--- 1 root   vboxusers     47712 27 giu 14.27 /usr/lib64/virtualbox/VBoxXPCOMC.so
-rwxr-x--- 1 root   vboxusers     27288 27 giu 14.27 /usr/lib64/virtualbox/VBoxXPCOMIPCD
-rwxr-x--- 1 root   vboxusers    533496 27 giu 14.27 /usr/lib64/virtualbox/VMMGC.gc
-rwxr-x--- 1 root   vboxusers    722296 27 giu 14.27 /usr/lib64/virtualbox/VMMR0.r0
-rws--x--- 1 root   vboxusers     26968 27 giu 14.27 /usr/lib64/virtualbox/VirtualBox
-rwxr-x--- 1 root   vboxusers   7120648 27 giu 14.27 /usr/lib64/virtualbox/VirtualBox.so
-rwxr-x--- 1 root   vboxusers    142456 27 giu 14.27 /usr/lib64/virtualbox/libvboxjxpcom.so
-rws--x--- 1 root   messagebus   310672 20 giu 13.36 /usr/libexec/dbus-daemon-launch-helper
-rwxr-s--x 1 root   utmp          14816 22 nov  2012 /usr/libexec/gnome-pty-helper

poi /usr/share/games è tutta root:games e /usr/share/polkit-1/rules.d è polkitd:root.

Se riemergi tutto quanto (emerge -e world) dovresti quasi sistemare la situazione, però mi viene da pensare che tu abbia anche cambiato i permessi in /dev (ma lì forse udev ti ha salvato) e /var, e lì è un po' più difficile sistemare.
_________________
Linux registered user 461710
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Fri Jun 28, 2013 7:12 am    Post subject: Reply with quote

reinstallare? oddio spero proprio di non doverlo fare :-) comunque, a parte gli scherzi, ho dato
Code:
emerge --sync
etc-update
sudo emerge --update --deep --with-bdeps=y world


adesso riesco anche a spegnere il pc (lo faccio con sudo halt, che ho inserito nel menu di openbox).
chrome prima non si avviava, adesso si.
l'unica cosa che appare ancora e'

Code:
giulio@miogentoo ~ $ su
Password:
setgid: Operazione non permessa
giulio@miogentoo ~ $ sudo nano /bin/su
sudo: /etc/sudoers.d è di proprietà dello uid 1000, dovrebbe essere di 0
sudo: /var/db/sudo è di proprietà dell'uid 1000, dovrebbe essere dell'uid 0

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
giulio@miogentoo ~ $


poi io non ho cups, ne' virtualbox,

provo a controllare i permessi di tutto il resto

e intanto grazie per i preziosi suggerimenti

EDIT

questo e' il risultato di
Code:
giulio@miogentoo ~ $ sudo # find /etc /bin /sbin /lib -not -group root -or -not -user root | xargs ls -ld
sudo: /etc/sudoers.d è di proprietà dello uid 1000, dovrebbe essere di 0
usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user
            name|#uid]
usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user
            name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u
            user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u
            user name|#uid] file ...


mentre per quanto riguarda
Code:
find /usr/[a-o]* -not -group root -or -not -user root | xargs ls -ld
l'output e' molto lungo, tanto che l'emulatore di terminale me ne da' solo la parte finale. Non saprei come tradurre questo comando in un file di testo im modo da poterlo visionare e/o postare..
Back to top
View user's profile Send private message
pierino_89
Guru
Guru


Joined: 03 Oct 2009
Posts: 522

PostPosted: Fri Jun 28, 2013 11:53 am    Post subject: Reply with quote

Hal-10000 wrote:
reinstallare? oddio spero proprio di non doverlo fare :-) comunque, a parte gli scherzi, ho dato
Code:
emerge --sync
etc-update
sudo emerge --update --deep --with-bdeps=y world


adesso riesco anche a spegnere il pc (lo faccio con sudo halt, che ho inserito nel menu di openbox).
chrome prima non si avviava, adesso si.

Evidentemente c'era da aggiornare qualche pacchetto correlato ai file in questione e ti ha sistemato i permessi. Per quello ti ho proposto emerge -e world.

Quote:

l'unica cosa che appare ancora e'

[code]giulio@miogentoo ~ $ su
Password:
setgid: Operazione non permessa


Fai il login come root in tty e riemergi app-admin/sudo e sys-apps/shadow, così almeno sudo e su vanno a posto.

Quote:

questo e' il risultato di [code]giulio@miogentoo ~ $ sudo # find /etc /bin /sbin /lib -not -group root -or -not -user root | xargs ls -ld
sudo: /etc/sudoers.d è di proprietà dello uid 1000, dovrebbe essere di 0
usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user
name|#uid]
usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user
name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u
user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u
user name|#uid] file ...
[/code]

Non dovevi lanciarli (data la tua situazione si limiterebbe a stampare TUTTI I FILE), era per illustrarti cosa dovresti correggere dopo aver lanciato "chown root:root /etc /bin /sbin /lib /usr" :P
_________________
Linux registered user 461710
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Fri Jun 28, 2013 2:35 pm    Post subject: Reply with quote

allora, ho ri-emerso da root in tty sudo e shadow. la situazione ora, per su e' normale, mentre per sudo ho ancora
Code:
giulio@miogentoo ~ $ sudo su
sudo: /etc/sudoers.d è di proprietà dello uid 1000, dovrebbe essere di 0
sudo: /var/db/sudo è di proprietà dell'uid 1000, dovrebbe essere dell'uid 0

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
miogentoo giulio #

anche se sudo su, non s dovrebbe usare..

Poi, ho dato
Code:
chown root:root /etc /bin /sbin /lib /usr
solo che adesso non ho capito perche' ma, per esempio, /etc/passwd e /etc/group sono ancora di giulio e non di root
Code:
giulio@miogentoo ~ $ ls -al /etc/passwd
-rw-r--r-- 1 giulio users 1301 29 mag 20.22 /etc/passwd
giulio@miogentoo ~ $ ls -al /etc/group
-rw-r--r-- 1 giulio users 594 29 mag 20.22 /etc/group

stessa cosa per:
Code:
$ ls -al /etc/polkit-1/rules.d
totale 12
drwx------ 2 giulio users 4096  2 mar 11.24 .
drwxr-xr-x 3 giulio users 4096  2 mar 11.24 ..
-rw-r--r-- 1 giulio users  321  2 mar 11.24 50-default.rules
giulio@miogentoo ~ $ ls -al /etc/polkit-1/rules.d/50-default.rules
-rw-r--r-- 1 giulio users 321  2 mar 11.24 /etc/polkit-1/rules.d/50-default.rule


Vorrei sapere se ora devo lanciare il comando
Code:
chown root:root /etc/passwd
e poi
chown root:root  /etc/group
e poi
chown root:root /etc/polkit-1/rules.d
confrontando ogni singola riga con quello che hai postato tu prima?
Sono un po' confuso, non vorrei creare altri danni.
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Fri Jun 28, 2013 8:56 pm    Post subject: Reply with quote

quando cambi i permessi ad una cartella (ed al suo contenuto) dovresti farlo ricorsivamente con l'pzione -R

Esempio
Code:
# chown -R root:root /etc


idem nel caso usassi chmod


comunue una bella ricompilata di tutto dovrebbe sdistemare buona parte del casotto
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Jun 29, 2013 3:01 pm    Post subject: Reply with quote

per 'una bella ricompilata' intendi una cosa simile a:
Code:
emerge --update --deep --with-bdeps=y world
?
Back to top
View user's profile Send private message
pierino_89
Guru
Guru


Joined: 03 Oct 2009
Posts: 522

PostPosted: Sat Jun 29, 2013 3:03 pm    Post subject: Reply with quote

Hal-10000 wrote:
per 'una bella ricompilata' intendi una cosa simile a:
Code:
emerge --update --deep --with-bdeps=y world
?


Penso intendesse -e come ho proposto io. Il tuo comando si limita ad aggiornare ciò che va aggiornato.
_________________
Linux registered user 461710
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Jun 29, 2013 3:12 pm    Post subject: Reply with quote

pierino_89 wrote:
Penso che ti sia scappato di mano un "chown -R" o qualcosa del genere, e di conseguenza i permessi dell'intero sistema sono andati a donnine di facili costumi :P

Controlla in che stato è il tuo sistema con:
Code:
find /lib /usr/ /etc /sbin /bin -group users -or -user giulio

Ci sarebbero altre cartelle da controllare, ma così già dovresti farti un'idea. In un sistema "sano" non dovrebbe uscire nulla (o quasi).



Ho ridato quel comando e adesso ho solo questo come risultato
Code:
 find /lib /usr/ /etc /sbin /bin -group users -or -user giulio/lib/rc/cache/deptree
/lib/rc/cache/depconfig
/lib/rc/cache/softlevel
/lib/rc/cache/nettree


Cio' significa che avrei risolto gran parte dei problemi?
Back to top
View user's profile Send private message
pierino_89
Guru
Guru


Joined: 03 Oct 2009
Posts: 522

PostPosted: Sat Jun 29, 2013 3:21 pm    Post subject: Reply with quote

Beh sicuramente ora va molto meglio :D
Dato che non hai un sistema multiutente dovresti poter sopravvivere anche con /usr con i permessi disastrati, io un emerge -e world lo darei, ma puoi anche lasciare che la cosa si risolva da sé col tempo (ad ogni aggiornamento si sistemerà qualcosa).
_________________
Linux registered user 461710
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Jun 29, 2013 3:32 pm    Post subject: Reply with quote

si', infatti lo sto facendo proprio ora. Ma cosa significa in particolare -e in emerge world?

EDIT: mi ha dato 616 aggiornamenti da fare 8O

strano perche' con il comando solito (emerge --update --deep --with-bdeps=y world) stamattina ha aggiornato solo firefox e nient'altro.
Back to top
View user's profile Send private message
pierino_89
Guru
Guru


Joined: 03 Oct 2009
Posts: 522

PostPosted: Sat Jun 29, 2013 3:38 pm    Post subject: Reply with quote

Hal-10000 wrote:
si', infatti lo sto facendo proprio ora. Ma cosa significa in particolare -e in emerge world?

EDIT: mi ha dato 616 aggiornamenti da fare 8O

strano perche' con il comando solito (emerge --update --deep --with-bdeps=y world) stamattina ha aggiornato solo firefox e nient'altro.


Solo? Hai proprio poca roba installata :D L'opzione -e reinstalla TUTTO. In genere si usa quando cambi CFLAGS o cose del genere.
_________________
Linux registered user 461710
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Jun 29, 2013 3:42 pm    Post subject: Reply with quote

ha, ecco! allora ci aggiorniamo a quando avra' finito (forse in nottata)

intanto, Ti / vi ringrazio tutti per l'aiuto :wink:
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Sun Jun 30, 2013 7:02 pm    Post subject: Reply with quote

Hal-10000 wrote:
si', infatti lo sto facendo proprio ora. Ma cosa significa in particolare -e in emerge world?

EDIT: mi ha dato 616 aggiornamenti da fare 8O

strano perche' con il comando solito (emerge --update --deep --with-bdeps=y world) stamattina ha aggiornato solo firefox e nient'altro.


dal man di emerge
Quote:
--emptytree (-e)
Reinstalls target atoms and their entire deep dependency tree, as though no packages are currently installed. You should run this with
--pretend first to make sure the result is what you expect.


Code:
# man emerge
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum