Professional Web Applications Themes

i add a user remotely but cannot login with ssh - Linux / Unix Administration

i login a pc(redhat9 OS) with ssh and add a user foo but i cannot login the pc by user foo with ssh remotely add user cmd as bellow: # /usr/sbin/useradd -p passwd foo # passwd -u foo thank you advanced! -- Posted via [url]http://dbforums.com[/url]...

  1. #1

    Default i add a user remotely but cannot login with ssh


    i login a pc(redhat9 OS) with ssh

    and add a user foo

    but i cannot login the pc by user foo with ssh remotely



    add user cmd as bellow:

    # /usr/sbin/useradd -p passwd foo

    # passwd -u foo



    thank you advanced!


    --
    Posted via [url]http://dbforums.com[/url]
    rockone Guest

  2. #2

    Default Re: i add a user remotely but cannot login with ssh

    On Sun, 19 Oct 2003 at 04:04 GMT, rockone wrote:
    >
    > i login a pc(redhat9 OS) with ssh
    >
    > and add a user foo
    >
    > but i cannot login the pc by user foo with ssh remotely
    >
    >
    >
    > add user cmd as bellow:
    >
    > # /usr/sbin/useradd -p passwd foo
    >
    > # passwd -u foo
    man useradd:

    -p passwd
    The encrypted password, as returned by crypt(3). The default is
    to disable the account.

    --
    Chris F.A. Johnson [url]http://cfaj.freeshell.org[/url]
    ================================================== =================
    My code (if any) in this post is copyright 2003, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License
    Chris F.A. Johnson Guest

  3. #3

    Default Re: i add a user remotely but cannot login with ssh



    >-p passwd
    >
    >The encrypted password, as returned by crypt(3).
    >
    >The default is to disable the account.
    >


    but cmd "passwd -u foo" is unlock it


    --
    Posted via [url]http://dbforums.com[/url]
    rockone Guest

  4. #4

    Default Re: i add a user remotely but cannot login with ssh

    On Sun, 19 Oct 2003 at 05:52 GMT, rockone wrote:
    >
    >>-p passwd
    >
    >>The encrypted password, as returned by crypt(3).
    >
    >>The default is to disable the account.
    >
    > but cmd "passwd -u foo" is unlock it
    But you didn't use an ENCRYPTED password.
    You used a plain text password.

    --
    Chris F.A. Johnson [url]http://cfaj.freeshell.org[/url]
    ================================================== =================
    My code (if any) in this post is copyright 2003, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License
    Chris F.A. Johnson Guest

  5. #5

    Default Re: i add a user remotely but cannot login with ssh


    thank you, now i know the reason.

    but can you tell me how to make it?


    --
    Posted via [url]http://dbforums.com[/url]
    rockone Guest

  6. #6

    Default Re: i add a user remotely but cannot login with ssh

    On Sun, 19 Oct 2003 at 08:38 GMT, rockone wrote:
    >
    > thank you, now i know the reason.
    >
    > but can you tell me how to make it?
    Either use a command (e.g.: "htpasswd -n USER | cut -d: -f2") or
    language (Perl, perhaps?) which has an interface to the crypt(3)
    function, or compile one. I use this C program:

    /* crypt.c */
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <unistd.h>

    int
    main(int argc, char *argv[])
    {
    char buf[1024];
    char *salt;

    if (argc > 1)
    {
    salt = argv[1];
    }
    else
    {
    salt = "$1$!#$%^&*";
    }

    while (fgets(buf,sizeof(buf),stdin))
    {
    if ( buf[strlen(buf)-1] == '\n' )
    {
    buf[strlen(buf) - 1] = '\0';
    }
    printf( "%s\n", crypt(buf,salt));
    }

    return 0;
    }


    Usage: crypt [SALT]

    The plain text password is passed to it on stdin, e.g.:

    echo passwd | crypt xx

    --
    Chris F.A. Johnson [url]http://cfaj.freeshell.org[/url]
    ================================================== =================
    My code (if any) in this post is copyright 2003, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License
    Chris F.A. Johnson Guest

  7. #7

    Default Re: i add a user remotely but cannot login with ssh


    Thank you very much!



    i also find bellow is ok.



    1. login with ssh

    2. su to root

    3. passwd foo


    --
    Posted via [url]http://dbforums.com[/url]
    rockone Guest

Similar Threads

  1. FMS2 unable to login to console remotely
    By bml in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: March 12th, 01:27 PM
  2. user and admin login on same login page
    By davellaman in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: May 16th, 07:47 PM
  3. Log In User running slow when accessing remotely
    By joolzzz in forum Dreamweaver AppDev
    Replies: 0
    Last Post: March 8th, 08:16 AM
  4. Replies: 0
    Last Post: July 9th, 11:13 PM
  5. Replies: 1
    Last Post: July 2nd, 03:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139