Linux - NewbieThis 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.
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.
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 ?
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.
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 ?
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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.