LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2012, 02:49 AM   #1
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Rep: Reputation: 0
ubuntu server smbpasswd not working


hi there im still pretty new to the whole linux ubuntu thing and im currently have some issues with the smpasswd command. i want to have to put a password in to map the network drive and its keeps telling me that it failed to add the username and password. ive tried a few different usernames and nothing seems to work. can anyone help me ?


cheers

mati
 
Old 08-01-2012, 03:01 AM   #2
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
First you have to add the user in samba record as "smbpassword -a <username>" & then provide the password for the user.

Also the user should be added locally (OS based) as "useradd -m <username>" with same password which is given to the samba user as shown above, so that it will appear in /etc/passwd file.
 
Old 08-01-2012, 03:16 AM   #3
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
smbpasswd

First you have to add the user in samba record as "smbpassword -a <username>" & then provide the password for the user.

i did that already in your above statement and i got the message saying i couldnt add the user. so do i add it forstas a local user then add it as a smpasswd ?

cheers

mati
 
Old 08-01-2012, 04:48 AM   #4
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
yes you have to create both the accounts in samba & local
 
Old 08-02-2012, 04:55 AM   #5
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smilemukul View Post
yes you have to create both the accounts in samba & local
hi there i have now done this and got it working to how i wanted it to but now i cannot create folders or copy files into it

Last edited by mati-92; 08-02-2012 at 07:25 AM.
 
Old 08-02-2012, 08:19 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
It's not really clear what you are trying to do. Could you expand on what you got working and what exactly you are trying to do?

A shot in the dark: To create a shared folder, two things must be done: The folder must be listed and configured in the /etc/samba/smb.conf file and the folder must be configured as "shared" in the folder permissions. If the folder is listed in smb.conf, but the permissions don't allow it to be shared, it might be visible, but can't be accessed.

My favorite Samba reference is Samba by Example.
 
Old 08-03-2012, 02:55 AM   #7
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
smbpasswd

morning heres is my situation i work in a community centre as an IT Technician and i have a server in the networking running linux ubuntu server software i have a share on that server for backups and also for central storage. last week it was wide open no password on so anyone with a bit of knoledge could go snooping around on it. so i wanted to put a password on the share.

i managed to put a password on so when mapping the drive your required to put a password in to access it but now i cant copy files over create folders inside the share i keep getting messages saying i dont have autherization to access.

here is what i have in the smb.conf

authentication

security=user

[langridge share]
comment=langridge share
path /share
browseable=yes
writeable=yes
 
Old 08-03-2012, 08:30 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
I hate to ask more questions, but I'm trying to visualize this issue.

When you try to connect to the samba share does Samba ask for a username and password or does it allow you to see the share?

When you say "I managed to put a password on" the share, what exactly did you do?

What is the output of ls -l when run on the shared folder? when run on the contents of the shared folder?

My LUG is meeting tomorrow. If I get a chance, I'll ask them for their input.
 
Old 08-04-2012, 04:41 AM   #9
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
smbpasswd

morning . when prompted i had to put a username and a password in to be able to map the share. when it accepted the username and password it then came up and i could see the share folder and its contents but could not copy anything to it or create a new folder kept telling me access denied.

when adding the password to the Ubuntu server i added it first as a local user then as a samba user.

mati
 
Old 08-04-2012, 08:37 PM   #10
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Thanks.

What was the output of the ls -l commands (they would need to be run from locally on the server)? I'm leaning to the idea that this might be a permissions issue and that information would help determine that.
 
Old 08-06-2012, 03:07 AM   #11
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
smbpasswd

im sorry im afraid i dont understand. im still new to all this can you explain a little bit more about the output commands

thank you

mati
 
Old 08-06-2012, 08:42 PM   #12
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Fair question. We were all newbies once.

ls means list files. It's similar to the DOS/Windows dir command, but much more versatile.

Code:
ls -l
list files -lengthy listing (that's my translation).

If will list the file permissions, ownership group, owner, file name, file size, and some other stuff. It's the permissions in particular that I'm curious about.

There's a pretty good introduction to it at this link; there's a description of -l argument right under the table of arguments. http://www.computerhope.com/unix/uls.htm

Last edited by frankbell; 08-06-2012 at 08:43 PM. Reason: clarity
 
Old 08-07-2012, 03:54 AM   #13
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
smbpasswd

morning i have used that command on the server this morning and the results are below

andrew
fqdn
share
staff

thank you for the reply

mati
 
Old 08-07-2012, 11:54 PM   #14
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
you had to use ls -l <samba share path> as your output in not correct.Please follow the instructions as what frankbell has guided.
 
Old 08-13-2012, 02:28 AM   #15
mati-92
Member
 
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41

Original Poster
Rep: Reputation: 0
smbpasswd

ive lost access to it i cant get map it no more.

argh!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SAMBA - smbpasswd not working !! the_reen Linux - Networking 2 06-16-2012 03:51 PM
adding users using smbpasswd, or synchronise passwd/smbpasswd gyodai Linux - Networking 2 03-11-2009 02:47 PM
SMBPASSWD not working in Kubuntu ricardogorayeb Ubuntu 1 10-07-2006 06:29 AM
smbpasswd -a ... smbpasswd: Command not found Lleb_KCir Linux - Software 7 08-11-2004 11:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration