Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO] Permessi root dir
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
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Wed Jan 04, 2006 4:53 pm    Post subject: [RISOLTO] Permessi root dir Reply with quote

Ciao a tutti.

Ho installato due macchine oggi. ed entrambi hanno lo stesso problema.
Quando provo ad aggiungere un utente con
Code:

adduser <utente>


tutto va per il verso giusto ma nella /home non compare la classica direcotry con il nome dell' utente. Il file passwd viene correttamente aggiornato.

Facendo una prova da remoto con ssh ottengo questo risultato

Code:

$ssh 10.101.18.201
Password:
Could not chdir to home directory /home/maruscya: No such file or directory
maruscya@gateway-test / $ cd /
maruscya@gateway-test / $ ls -l
ls: .: Permission denied
maruscya@gateway-test / $
 


Non so cosa puo' essere. L'utente Root funziona senza problemi. Questo mi fa pensare che sia un problema di diritti.
Se puo' tornare utile posto anche fstab

Code:

/dev/sda1               /               reiserfs        noatime                 0 1
/dev/sda2              none            swap            sw                      0 0
/dev/cdrom           /mnt/cdrom      iso9660         noauto,ro               0 0
proc                    /proc           proc            defaults        0 0
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0


Credo che sia propio una caolatina, ma non so dove mettere le mani.

MaruscyA


Last edited by maruscya on Thu Jan 05, 2006 9:17 am; edited 1 time in total
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Wed Jan 04, 2006 5:02 pm    Post subject: Reply with quote

la cartella della home per l'utente esiste ed è scrivibile da egli?
_________________
Running Fast!
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Wed Jan 04, 2006 5:23 pm    Post subject: Reply with quote

Come ti scrive chiaro e tondo non esiste la directory.

Leggiti il man.

Siccome non sono solo rompipalle ti consiglio
Code:

*  app-admin/superadduser
      Latest version available: 1.0.9
      Latest version installed: 1.0.9
      Size of downloaded files: 0 kB
      Homepage:    http://www.interlude.org.uk/unix/slackware/
      Description: Interactive adduser script from Slackware
      License:     BSD

che ti guida in modo interattivo nella creazione di un utente, consistente e molto rapido.
Back to top
View user's profile Send private message
neryo
Veteran
Veteran


Joined: 09 Oct 2004
Posts: 1292
Location: Ferrara, Italy, Europe

PostPosted: Wed Jan 04, 2006 5:34 pm    Post subject: Reply with quote

GiRa wrote:

Siccome non sono solo rompipalle


ti GIRano solo le palle.. :wink:
_________________
cache: a safe place for hiding or storing things..

D-link DWL-G650 AirPlus
Apache Php Mysql
Back to top
View user's profile Send private message
X-Drum
Advocate
Advocate


Joined: 24 Aug 2003
Posts: 2517
Location: ('Modica','Trieste','Ferrara') Italy

PostPosted: Wed Jan 04, 2006 5:44 pm    Post subject: Reply with quote

beh per ovviare al problema ti basta creare le home dir (non root dir)
degli utenti, tipicamente:
Code:
/home/nome_utente


ovviamente ti conviene dare anche un:
Code:
chown nome_utente:gruppo /home/unome_utente

_________________
"...There are two sort of lies, lies and benchmarks..."
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Wed Jan 04, 2006 6:00 pm    Post subject: Reply with quote

per futura memoria posto anche il contenuto della pagina man
man wrote:
-m La home directory dell'utente verra creata se non esiste. I file
contenuti in dir_scheletro saranno copiati nella home directory
se viene usata l'opzione -k, altrimenti verranno usati i file
contenuti in /etc/skel. Anche tutte le directory contenute in
dir_scheletro o /etc/skel verranno create nella home directory
dell'utente. L'opzione -k e valida solo in congiunzione con
l'opzione -m. Il comportamento predefinito e di non creare la
directory e di non copiarvi alcun file.

_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Wed Jan 04, 2006 7:07 pm    Post subject: Reply with quote

neryo wrote:
ti GIRano solo le palle.. :wink:


Che fantasia! Mai sentita! :p

:D :D :D :D
Back to top
View user's profile Send private message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Wed Jan 04, 2006 7:57 pm    Post subject: Reply with quote

Rispondo a tutti da casa .... percui non posso provare sulla macchina direttamente.

Ho creato a mano la cartella utente cosi :

Code:

#>mkdir /home/utente
#>chown utente:users /home/utente


ma il problema che non riesco a fare ls della / come lo risolvo ??

Code:

maruscya@gateway-test / $ cd /
maruscya@gateway-test / $ ls -l
ls: .: Permission denied
maruscya@gateway-test / $


Intanto domani mi installo questo superadduser :)

Spero di non aver fato GiRa' le balle a nessuno :)
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Wed Jan 04, 2006 9:48 pm    Post subject: Reply with quote

maruscya wrote:

ma il problema che non riesco a fare ls della / come lo risolvo ??


Code:
# chmod 755 /

_________________
Running Fast!
Back to top
View user's profile Send private message
neryo
Veteran
Veteran


Joined: 09 Oct 2004
Posts: 1292
Location: Ferrara, Italy, Europe

PostPosted: Thu Jan 05, 2006 7:45 am    Post subject: Reply with quote

Quote:

Spero di non aver fato GiRa' le balle a nessuno :)


hehe :lol:
_________________
cache: a safe place for hiding or storing things..

D-link DWL-G650 AirPlus
Apache Php Mysql
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Thu Jan 05, 2006 8:39 am    Post subject: Reply with quote

@maruscya
Scusa ma hai letto il post di Cazzantonio o l'hai saltato ?
Basta usare l'opzione -m perchè adduser crei la home per l'utente, non hai bisogno di installare altro sw quando quello che già hai basta per le tue esigenze (è sufficiente conoscerlo)
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Thu Jan 05, 2006 8:54 am    Post subject: Reply with quote

Luca89 wrote:


Code:
# chmod 755 /



Non sembra andare ancora... quando da utente root provo

Code:

#>ls -l
drwxr-xr-x   2 root root  3472 Jul 30 19:12 bin
drwxr-xr-x   2 root root   392 Jan  4 15:02 boot
drwxr-xr-x  23 root root 29720 Jan  4 17:57 dev
drwxr-xr-x  35 root root  3032 Jan  5 09:54 etc
drwxr-xr-x   3 root root    96 Jan  5 09:54 home
drwxr-xr-x   7 root root  3672 Jan  4 11:29 lib
drwxr-xr-x   4 root root   120 Jul 26 19:11 mnt
drwxr-xr-x   5 root root   272 Jan  4 17:15 opt
drwxr-xr-x  55 root root     0 Jan  4 18:56 proc
drwxr-xr-x   3 root root   128 Jan  4 17:37 root
drwxr-xr-x   2 root root  3392 Jan  4 12:31 sbin
drwxr-xr-x  10 root root     0 Jan  4 18:56 sys
drwxr-xr-x   9 root root   312 Jan  4 17:58 tmp
drwxr-xr-x  13 root root   392 Jan  3 18:32 usr
drwxr-xr-x  13 root root   360 Jan  4 15:19 var


Quindi di diritti mi sembrano a posto. Ma da user non riesco a vedere il contenuto della /. Ho provato come utente a lanciare root altri comandi tipo : grep, cat, etc e questi funzionano bene. Ho provato anche fa fare un

Code:

#>cd /bin
#>cd /mnt


E tutto va a buon fine.... e' solo la / che non riesco a vedere

Il filesystem e' ReiserFs e c'e' una dir nascosta chiamata .reiserfs_priv che non so cosa sia....
Potrebbe essere il problema causato dal file fstab ??

AndreA
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Thu Jan 05, 2006 9:02 am    Post subject: Reply with quote

Hai fatto una porcheria cambiando i permessi così!!!!!!!!!

A parte la sicurezza, hai cambiato /tmp!!!! Rimettili a posto (io ho un 64bit quindi ho delle cose in più):
Code:
drwxr-xr-x    2 root root  4096 25 nov 22:09 bin
drwxr-xr-x    2 root root  4096 24 giu  2005 boot
drwxr-xr-x   22 root root 29900  4 gen 18:20 dev
drwxr-xr-x    3 root root  4096 28 mag  2005 emul
drwxr-xr-x   59 root root  4096  5 gen 08:15 etc
drwxr-xr-x    8 root root  4096  6 ago 14:24 home
lrwxrwxrwx    1 root root     5 27 ago 09:56 lib -> lib64
drwxr-xr-x    2 root root  4096  7 ott 00:16 lib32
drwxr-xr-x    9 root root  4096 25 nov 20:58 lib64
drwx------    2 root root 16384 21 mag  2005 lost+found
drwxr-xr-x    7 root root  4096  1 lug  2005 mnt
drwxr-xr-x   11 root root  4096 21 ott 19:11 opt
dr-xr-xr-x   93 root root     0  4 gen 19:19 proc
drwx------   19 root root  4096  5 gen 09:55 root
drwxr-xr-x    2 root root  4096 23 dic 02:29 sbin
drwxr-xr-x   10 root root     0  4 gen 19:19 sys
drwxrwxrwt  103 root root  8192  5 gen 09:54 tmp
drwxr-xr-x   17 root root  4096  8 nov 13:59 usr
drwxr-xr-x   13 root root  4096 19 set 22:58 var


Credo tu non veda / perchè nella directory home dell'utente che hai creato mancano i file per bash! Copiali da /etc/skel (che guardacaso è citata in man adduser)
Code:

ls -a /etc/skel/
.  ..  .bash_logout  .bash_profile  .bashrc  .tcsh.config
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Thu Jan 05, 2006 9:11 am    Post subject: Reply with quote

maruscya wrote:
Luca89 wrote:


Code:
# chmod 755 /


Non sembra andare ancora... quando da utente root provo


Strano, era un bug di alcuni stage3 e ricordo che si risolveva così, quel comando l'hai dato da root? Comunque che stage hai usato e che versione?
_________________
Running Fast!
Back to top
View user's profile Send private message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Thu Jan 05, 2006 9:16 am    Post subject: Reply with quote

Luca89 wrote:


Strano, era un bug di alcuni stage3 e ricordo che si risolveva così, quel comando l'hai dato da root? Comunque che stage hai usato e che versione?


FUNZIONA !!!!
Nel precedente tentativo ho fatto

Code:

#>chmod 755 *


mentre mi trovavo nella / . Per che (ulo !!! ho beccato propio un bel bug :)

Grazie ancora a tutti quanti !
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Thu Jan 05, 2006 9:23 am    Post subject: Reply with quote

OK, ma ora sistema i permessi delle directory contenute in /, è meglio :wink:
Back to top
View user's profile Send private message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Thu Jan 05, 2006 10:03 am    Post subject: Reply with quote

GiRa wrote:
OK, ma ora sistema i permessi delle directory contenute in /, è meglio :wink:


Ok... grazie del consiglio... In effetti /root era aperta a tutti :)

Oltre a /root e /tmp le altre dir mi sembrano a posto.

Non trovo piu' la lost&found pero'...
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