Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne][PHP][LINUX]php, dodawanie użytkownika
ert
post 14.03.2013, 09:49:09
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 14.03.2013

Ostrzeżenie: (0%)
-----


Mam problem, jestem nowy w PHP.
Mam skrypt do automatycznego dodawania użytkownika via www.

  1. function add_user($user, $pass) {
  2. $pass = crypt($pass);
  3. $this->ssh_exec("mkdir /home/$user");
  4. $this->ssh_exec("useradd -d '/home/$user' -g users -p '$pass' $user");
  5. $this->ssh_exec("usermod -s /bin/bash $user");


Wszystko fajnie i pięknie, użytkownik się dodaje, ale nie mogę się zalogować - mam komunikat o błędnym haśle.

Pomożecie?

Ten post edytował ert 14.03.2013, 10:58:45
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 00:45