Probleme adduser par root

Résolu/Fermé
mathieudec Messages postés 23 Date d'inscription samedi 31 mai 2008 Statut Membre Dernière intervention 17 septembre 2009 - 31 mai 2008 à 15:36
 dada - 19 janv. 2014 à 21:19
Bonjour,
J'ai un probleme suite a l'achat d'un ordinateur acer, avec linpus linux 9.2.

Je souhaite ajouter un utilisateur, et cela ne marche pas trop. Voilà ce que je t'appe :


[root@localhost ~]# /etc/default/useradd -d /home/mathieu -m -s /bin/bash mathie
u


ensuite je veux modifier son mot de passe, voici le message reçu :


[root@localhost ~]# /etc/passwd mathieu
/etc/passwd: line 1: root:x:0:0:root:/root:/bin/bash: No such file or directory
/etc/passwd: line 2: bin:x:1:1:bin:/bin:/sbin/nologin: No such file or directory
/etc/passwd: line 3: daemon:x:2:2:daemon:/sbin:/sbin/nologin: No such file or directory
/etc/passwd: line 4: adm:x:3:4:adm:/var/adm:/sbin/nologin: No such file or directory
/etc/passwd: line 5: lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin: No such file or directory
/etc/passwd: line 6: sync:x:5:0:sync:/sbin:/bin/sync: No such file or directory
/etc/passwd: line 7: shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown: No such file or directory
/etc/passwd: line 8: halt:x:7:0:halt:/sbin:/sbin/halt: No such file or directory
/etc/passwd: line 9: mail:x:8:12:mail:/var/spool/mail:/sbin/nologin: No such file or directory
/etc/passwd: line 10: news:x:9:13:news:/etc/news:: No such file or directory
/etc/passwd: line 11: uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin: No such file or directory
/etc/passwd: line 12: operator:x:11:0:operator:/root:/sbin/nologin: No such file or directory
/etc/passwd: line 13: games:x:12:100:games:/usr/games:/sbin/nologin: No such file or directory
/etc/passwd: line 14: gopher:x:13:30:gopher:/var/gopher:/sbin/nologin: No such file or directory
/etc/passwd: line 15: ftp:x:14:50:FTP: command not found
/etc/passwd: line 16: nobody:x:99:99:Nobody:/:/sbin/nologin: No such file or directory
/etc/passwd: line 17: dbus:x:81:81:System: command not found
/etc/passwd: line 18: rpm:x:37:37::/var/lib/rpm:/sbin/nologin: No such file or directory
/etc/passwd: line 19: ntp:x:38:38::/etc/ntp:/sbin/nologin: No such file or directory
/etc/passwd: line 20: apache:x:48:48:Apache:/var/www:/sbin/nologin: No such file or directory
/etc/passwd: line 21: nscd:x:28:28:NSCD: command not found
/etc/passwd: line 22: vcsa:x:69:69:virtual: command not found
/etc/passwd: line 23: netdump:x:34:34:Network: command not found
/etc/passwd: line 24: pcap:x:77:77::/var/arpwatch:/sbin/nologin: No such file or directory
/etc/passwd: line 25: named:x:25:25:Named:/var/named:/sbin/nologin: No such file or directory
/etc/passwd: line 26: mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin: No such file or directory
/etc/passwd: line 27: smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin: No such file or directory
/etc/passwd: line 28: rpc:x:32:32:Portmapper: command not found
/etc/passwd: line 29: xfs:x:43:43:X: command not found
/etc/passwd: line 30: rpcuser:x:29:29:RPC: command not found
/etc/passwd: line 31: nfsnobody:x:65534:65534:Anonymous: command not found
/etc/passwd: line 32: postfix:x:89:89::/var/spool/postfix:/sbin/nologin: No such file or directory
/etc/passwd: line 33: sshd:x:74:74:Privilege-separated: command not found
/etc/passwd: line 34: haldaemon:x:68:68:HAL: command not found
/etc/passwd: line 35: gdm:x:42:42::/var/gdm:/sbin/nologin: No such file or directory
/etc/passwd: line 36: ivman:x:102:102::/var/ivman:/sbin/nologin: No such file or directory
/etc/passwd: line 37: avahi:x:70:70:Avahi: command not found
/etc/passwd: line 38: fbubble:x:103:103::/:/sbin/nologin: No such file or directory
/etc/passwd: line 39: hsqldb:x:96:96::/var/lib/hsqldb:/sbin/nologin: No such file or directory

Il n'y a aucun dossier nommé mathieu créé.
Aussi, j'ai du ajouter les droits à la main sur la fonction "passwd" et "useradd", est ce normal?

Si quelqu'un pouvait m'aider ce serait très sympa.
Merci,

Mathieu
A voir également:

5 réponses

burrin Messages postés 202 Date d'inscription vendredi 16 mars 2007 Statut Membre Dernière intervention 23 décembre 2008 69
31 mai 2008 à 15:40
Tu invoque mal tes commandes.

Pour modifier ton mdp tu a raison il faut utiliser passwd mais la commande ne se trouve pas dans /etc/passwd!!!!!!

Tape juste passwd mathieu.

Ma remarque porte aussi sur adduser qui ne se trouve pas dans /etc.

Pour info /etc est le repertoire qui contient tout les fichiers de configuration.
1
mathieudec Messages postés 23 Date d'inscription samedi 31 mai 2008 Statut Membre Dernière intervention 17 septembre 2009
31 mai 2008 à 15:48
Merci de cette réponse rapide !

Je suis d'accord, j'avais fait ça au début, mais j'obtiens :

adduser -d /home/mathieu -m -s /bin/bash mathieu
"bash: adduser: command not found"

Il n'y a pas un genre de "PATH" à exporter?


Merci


Mathieu
0
onesdf Messages postés 375 Date d'inscription mercredi 21 mai 2008 Statut Membre Dernière intervention 17 octobre 2008 120 > mathieudec Messages postés 23 Date d'inscription samedi 31 mai 2008 Statut Membre Dernière intervention 17 septembre 2009
31 mai 2008 à 15:50
C'est useradd, et si tu rajoutes -p à la fin de ta commande ça induit la fonction passwd
0
mathieudec Messages postés 23 Date d'inscription samedi 31 mai 2008 Statut Membre Dernière intervention 17 septembre 2009 > onesdf Messages postés 375 Date d'inscription mercredi 21 mai 2008 Statut Membre Dernière intervention 17 octobre 2008
31 mai 2008 à 15:53
Oui pardon, j'ai inversé. mais j'ai toujours le probleme.

[root@localhost ~]# useradd -d /home/mathieu -m -s /bin/bash mathieu
bash: useradd: command not found


...
0