Click to See Complete Forum and Search --> : sharing files on a w2k domain


2dum2bacomputer
01-25-2003, 12:39 AM
OK,
I setup samba on my linux, and I can see my linuxbox on the w2k network nieborhood side, but I can't access anything past there.
I click on the computer and it says "incorrect password or username for computer \\linuxbox.
I tried setting a user up on the linux with smbpasswd, but when I type at the console:smbpasswd root,
it says: enter new smb password,
and type it again.
And when I do it says:"unable to open passdb database.
failed to find user root.
failed to modify password for user root.

If any1 could help me I would appreciate it.

cowanrl
01-26-2003, 11:48 AM
The first time you use the smbpasswd command, you will always get the "unable to open passdb database" error because it doesn't exist yet. The command will work though.

To create a new user with the smbpasswd command, you need to use the -a switch like this:

smbpasswd -a root

It will prompt you for the password twice.

The reason you got the error message:

failed to find user root.
failed to modify password for user root

is because without the -a switch, then you were actually trying to modify a username that didn't exist.

To make life easy, try to use the same usernames in Linux as you do in Windows. If you are logging in to Win2k with the username of 2dum2bacomputer, then use:

smbpasswd -a 2dum2bacomputer

Enter the same password you use in Windows.
If you don't do it that way, then you will be prompted for a username and password everytime you try to access a Samba share on your Linux box.

Another important thing to remember is that whatever username you use with smbpasswd must already be a valid Linux username. If not, then you need to create it with the useradd command or from the Linux GUI User Admin program of your choice.
The username must exist in both places for it to work.