LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba Login Failed (https://www.linuxquestions.org/questions/linux-networking-3/samba-login-failed-441783/)

winxlinx 05-05-2006 01:27 AM

Samba Login Failed
 
Hi Everyone

I can able to get login screen when i am trying from xp machine using \\192....... in the run.
But i cannot able to login into that .

And here is my orginal sam.conf (samba file)what i used
i am pasting here

Have a look at this file also and pls tell me where i
went wrong

my smb.conf

netbios name = linux.test.com

workgroup = one

security = user

smb passwd file /etc/smbpasswd

[homes]

comment Unix home directory space

path = /home/test

writeable = yes

valid users = root

create mode = 0600

directory mode = 0700

locking = no


vimal 05-05-2006 02:51 AM

Hello winxlinx,

Could you be more specific on how you configured the samba share? Have you created the samba paasword file with the command 'mksmbpasswd.sh'? Moreover the path to smbpasswd is '/etc/samba/smbpasswd' and not '/etc/smbpasswd'. Also you have to create a password for the every samba user using the command 'smbpasswd'. Another point is that you don't use a fully qualified domain name as a netbios name, its just a short name and not divided by periods. If you could please specify the steps you did on configuring the smb daemon, it will be easy for us to locate the error.

Thanks,,,

winxlinx 05-05-2006 04:58 AM

Hi Vimal (thanks for the reply )

what i did is i just deleted the old samba file and creted a new smb.conf by using touch command

And then i copied the contents into the smb.conf (as i read into one wep page the same contents i cut and pasted )

Then i start the samba service by using service smb start

it is started successfully

But i did not set the password and all for the smb

This was the exact steps what i did

well and good if u help me solve this issue

winxlinx 05-05-2006 05:14 AM

Hi Vimal

Now i added this line extra

password server = ADSERVER


And then i type the command

smbpasswd

it is giving the error

[root@kmglinux etc]# smbpasswd
New SMB password:
Retype new SMB password:
unable to open passdb database.
Failed to find entry for user root.
Failed to modify password entry for user root

crazytigger 05-05-2006 05:26 AM

try creating a new user called something like smbuser and add them to the allowed users in your smb.conf, then set the password as you tried before. I could be wrong but i dont think you want to be logging in as or attemping to set the password for "root"

vimal 05-05-2006 09:08 PM

Hello winxlinx,

After configuring the smb.conf file (you could get back the file if you forcefully install the package), add the local password database to the smbpasswd database using the command 'cat /etc/passwd|mksmbpasswd.sh>/etc/samba/smbpasswd'. this creates the samba password file. After that you could add users by using the command 'smbpasswd username'. Now restart the service and you can use samba as usual. If you have any problems, please reply. Remember that samba works only by creating a user database using the above command.

Thanks,,

winxlinx 05-09-2006 02:58 AM

Hi Vimal
I just new ti linux ,i never been set password file below

can u tell me the example commands or paste the command here what u have used foe it

it will helpful for me to solve this issue

Thanks & Regards
Winxlinx

vimal 05-09-2006 09:03 PM

Hello Winxlinx,

I think i would detail out the steps on configuring samba here. First of all, install the packages :==
1) Samba
2) Samba-common
3) Samba-client (For client side)
4) Samba-swat (For a GUI cofig: utility)

After installing, configure your smb.conf file, according to your specifications. To add users to authenticate and use samba shares, you have to add the users from the local passwd file. For the same, use the following command:== 'cat /etc/passwd|mksmbpasswd.sh>/etc/samba/smbpasswd'.

Now the samba user database is created. As the next step, add the users who are allowed to login and access samba shares via the command 'smbpasswd'.

ie,, 'smbpasswd username' ,and specify the password which adds the user as a valid samba user. Only the user guest or smbguest are allowed login without a password, provided the share is exported with 'guest ok' mode. All other shares need a valid login.

Please don't forget to restart the service, so the changes takes place. You can access the shares either via mounting the share onto the local filesystem or by using smbclient. The format of smbclient is as follows:==

'smbclient //IP/share name -U username'.

Hope this configuration works, please write in if problems persists.


Thanks,,,,

winxlinx 05-10-2006 12:26 AM

Hi Vimal,

Really Thanks for your explination,you have explained it very neetly.

let me try of this command and i will let you know what happen


Thanks
Winxlinx

winxlinx 05-10-2006 12:38 AM

Hi Vimal

This is the error i am getting

There is no sampasswd file in samba directory initially , i created manually by using touch smbpasswd

after creating it, when i am setting the passwd for the user

i am getting this error

[root@kmglinux samba]# smbpasswd sankar
New SMB password:
Retype new SMB password:
Failed to find entry for user sankar.
Failed to modify password entry for user sankar

may be i went wrong with my smb.conf file configuration ????

or

You just give me any sample working smb.conf file

i will copy that same file in my machine and tell me where i need to change as per my setting i will do that

Thanks & Regards
Winxlinx

routers 05-10-2006 01:01 AM

[root@kmglinux samba]# smbpasswd sankar

use this command

# smbpasswd -a sankar

make sure sankar user exist in UNIX password database
check your /etc/password if exist then fine otherwise adduser sankar first to the system before u add to smb user

vimal 05-10-2006 02:30 AM

Hello winxlinx,

You need an existing account in the localmachine. Only a user who exists in the localmachine can be added to the smbpasswd file. Add the user first, then create the smbpasswd file,( you need to uncomment the line containing the path of smbpasswd file).

This is the format of smb.conf. Only the relevant portions are added.
workgroup = MYGROUP
server string = Samba Server
hosts allow = 192.168.1. 192.168.2. 127.
guest account = pcguest
log file = /var/log/samba/smbd.log
max log size = 50
security = user
smb passwd file = /etc/samba/smbpasswd


#============================ Share Definitions ==============================
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
winbind use default domain = no
[homes]
comment = Home Directories
browseable = no
writable = yes


Thanks,,

winxlinx 05-10-2006 04:09 AM

Yes Thank You Vimal

its working file but sankar is already exits

but when i am trying sampasswd -a sankar its working fine

Like to have touch with you

Thanks for your help

Can You give ur chat id if you are interested

And where your from ?

Bye

vimal 05-10-2006 09:15 PM

Hello winxlinx,

Happy to know it got working. I am from India and my chat id is vimal_vimalkumar66(yahoo). If any problems exist feel free to contact so I can do whatever I can to get it working. Good luck...

Thanks,,

winxlinx 05-11-2006 01:53 AM

Thanks Vimal

i will contact u in yahoo ,even i am from india bangalore only


All times are GMT -5. The time now is 09:48 PM.