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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-01-2012, 03:49 AM
|
#1
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Rep:
|
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
|
|
|
08-01-2012, 04:01 AM
|
#2
|
Member
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292
Rep:
|
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.
|
|
|
08-01-2012, 04:16 AM
|
#3
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
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
|
|
|
08-01-2012, 05:48 AM
|
#4
|
Member
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292
Rep:
|
yes you have to create both the accounts in samba & local
|
|
|
08-02-2012, 05:55 AM
|
#5
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
Quote:
Originally Posted by smilemukul
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 08:25 AM.
|
|
|
08-02-2012, 09:19 PM
|
#6
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,775
|
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.
|
|
|
08-03-2012, 03:55 AM
|
#7
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
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
|
|
|
08-03-2012, 09:30 PM
|
#8
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,775
|
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.
|
|
|
08-04-2012, 05:41 AM
|
#9
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
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
|
|
|
08-04-2012, 09:37 PM
|
#10
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,775
|
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.
|
|
|
08-06-2012, 04:07 AM
|
#11
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
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
|
|
|
08-06-2012, 09:42 PM
|
#12
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,775
|
Fair question. We were all newbies once.
ls means list files. It's similar to the DOS/Windows dir command, but much more versatile.
li st 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 09:43 PM.
Reason: clarity
|
|
|
08-07-2012, 04:54 AM
|
#13
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
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
|
|
|
08-08-2012, 12:54 AM
|
#14
|
Member
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292
Rep:
|
you had to use ls -l <samba share path> as your output in not correct.Please follow the instructions as what frankbell has guided.
|
|
|
08-13-2012, 03:28 AM
|
#15
|
Member
Registered: May 2011
Location: united kingdom
Distribution: ubuntu/debian server and centos/fedora server
Posts: 41
Original Poster
Rep:
|
smbpasswd
ive lost access to it i cant get map it no more.
argh!
|
|
|
All times are GMT -5. The time now is 11:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|