Find the answer to your Linux question:
Results 1 to 4 of 4
I am setting up samba and I need to run this script cat /etc/passwd | mksmbpasswd.sh >/usr/local/samba/private/smbpasswd but it doesn't work. It says the directory doesn't exist. I can't find ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    9

    Samba Issues


    I am setting up samba and I need to run this script
    cat /etc/passwd | mksmbpasswd.sh >/usr/local/samba/private/smbpasswd

    but it doesn't work. It says the directory doesn't exist. I can't find encryption.txt and I took this script from an old one.

    What is the right command for Mandrake 10 which uses samba 2.2.6 I belive.

    Any help

  2. #2
    Just Joined!
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    47
    Hi,

    Mandrake 10 installs Samba 3 by default, but it also includes Samba 2.

    Are you sure you installed Samba 2?

    If you didn't, and, in that case, you have Samba 3 installed, there is no mksmbpasswd.sh script.

    You can make yours though. The script is the following:

    Code:
    #!/bin/sh
    awk 'BEGIN {FS=":"
            printf("#\n# SMB password file.\n#\n")
            }
    { printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U          ]:LCT-00000000:%s\n", $1, $3, $5) }
    '
    If you installed Samba 2, the script is in /usr/bin.

    Also the smbpasswd file isn't in /usr/local/samba/private.

    It's located in /etc/samba, if you have Samba 3, or in /etc/samba2, if you have Samba 2.

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    9
    You are right. It is 3. So what do I need to do to get encryption working?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    47
    What do you mean by turn encryption on?

    The only thing i could find related is the option "encrypt passwords" in /etc/samba/smb.conf.

    You have to put the following line in the global section of you smb.conf:

    Code:
    encrypt passwords = yes
    This will make Samba use encrypted passwords. But i think it already does this by default.

    NOTE: After you run the mksmbpasswd.sh script, you still have to change each user samba passwd, with "smbpasswd username".

Posting Permissions

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