LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-02-2003, 10:43 AM   #1
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Rep: Reputation: 30
Lightbulb I get this error when trying to add users('smbpasswd -a XXX').


Here is the screen :

root@JAC:/usr/local/samba/bin# ./smbpasswd -a JAC
New SMB password:
Retype new SMB password:
User JAC does not exist in system password file (usually /etc/passwd). Cannot add account without a valid local system user.
Failed to modify password entry for user JAC


I am stumped on this because, of course the user does not exist, I am trying to add a new user. My log files in var/samba/ don't help me either.

Any ideas ?

JC
 
Old 05-02-2003, 10:56 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
You need to have a valid _Linux_ user to add an smb user.
 
Old 05-02-2003, 11:02 AM   #3
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Could you elaborate on that ?

JC
 
Old 05-02-2003, 11:49 AM   #4
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
What he means is that the user has to be already in the system. You can't just add a new user to samba without them being in the system. For example, type this:

"useradd JAC"
"passwd JAC"

Enter the password for JAC. By doing this, you have just added user JAC to your system. Now, you are able to add JAC to your samba file.

"smbpasswd -a JAC"

Everything should go well at this point. Hope it clears up your confusion. BTW, these commands work for redhat. I dont have if the commands are the same for Slackware but I think you got my point

-twantrd
 
Old 05-02-2003, 12:09 PM   #5
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Rep: Reputation: 15
Hey

you need to have a user created before you can ad an smb user.

#useradd (username)

#passwd (username) (passsword)

then you can do

#smbadduser (username:username)
 
Old 05-02-2003, 12:10 PM   #6
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Rep: Reputation: 15
I was a bit late I guess... foget to send this out when I finished it lol
 
Old 05-02-2003, 03:06 PM   #7
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Thumbs up

Thanks for the help everyone !

JC
 
Old 05-02-2003, 06:34 PM   #8
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Once again, thanks for the help ! Problem solved ! I ran into another problem, which I fixed, but would like to attatch to this post.

When the 'smb.conf' file had this entry :

'smb passwd file = /etc/passwd'

I would get these errors after trying to perform 'smbpasswd -a xxx' :

getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
getsmbfilepwent: malformed password entry (uid not number)
mod_smbfilepwd_entry: malformed password entry (uid not number)
Password changed for user jac.
Failed to modify entry for user jac.
Failed to modify password entry for user jac

The fix was simply to change 'smb.conf' like this :

'smb passwd file = /etc/smbpasswd'

And then create a blank file in that directory called 'smbpasswd'.

It worked without any errors after that.

Does anyone know why it works that way ?
Just curious.

JC
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error, some other host already uses address XXX.XXX.XXX.XXX" mwbb_support Linux - Networking 5 01-20-2014 08:59 AM
adding users using smbpasswd, or synchronise passwd/smbpasswd gyodai Linux - Networking 2 03-11-2009 02:47 PM
Problem getting connection with a DLink Router with IP 10.xxx.xxx.xxx kezira Fedora 9 11-28-2005 10:31 PM
Problem getting connection with a DLink Router after setting static IP 10.xxx.xxx.xxx kezira Linux - Networking 1 11-09-2005 10:27 PM
Host XXX.XXX.XXX.XXX is not allowed to connect to this MySQL server ocavid Linux - Newbie 2 03-16-2005 09:40 AM


All times are GMT -5. The time now is 06:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration