Create a Samba User on Ubuntu Gumawa ng isang Samba User sa Ubuntu
If you are using Samba Server on your network, you will want to create users that have access to use it. Kung ikaw ay gumagamit ng Samba Server sa inyong network, ay gusto mong gumawa ng mga gumagamit na may access sa gumamit ito. There's a very simple command structure on how to do so. May isang napaka-simpleng istraktura ng utos sa kung paano gawin ito.
I'm assuming that you've already Ako ipagpapalagay na nakatanggap na na ikaw ay installed Samba Server naka-install na Samba Server at this point. sa puntong ito.
There are two steps to creating a user. Mayroong dalawang mga hakbang sa paggawa ng isang user. First we'll run the smbpasswd utility to create a samba password for the user. Una namin patakbuhin ang smbpasswd utility na lumikha ng isang samba password para sa gumagamit.
sudo smbpasswd -a <username> sudo smbpasswd-a <username>
Next, we'll add that username to the smbusers file. Next, namin magdagdag na username sa smbusers file.
sudo gedit /etc/samba/smbusers sudo gedit / etc / samba / smbusers
Add in the following line, substituting the username with the one you want to give access to. Idagdag sa mga sumusunod na linya, substituting ang username na may isa na gusto mong bigyan ng access sa. The format is <ubuntuusername> = “<samba username>”. Ang format ay <ubuntuusername> = "<samba username>". You can use a different samba user name to map to an ubuntu account, but that's not really necessary right now. Maaari kang gumamit ng iba't-ibang samba pangalan ng user sa mapa sa isang Ubuntu account, ngunit iyan ay hindi talagang kinakailangan sa ngayon.
<username> = “<username>” <username> = "<username>"
Now you can create samba shares and give access to the users that you listed here. Ngayon ay maaari kang lumikha ng gumagamit samba at bigyan ng access sa mga gumagamit na nakalista dito.

Daily Email Updates Araw-araw na Updates Email
You can get our how-to articles in your inbox each day for free. Maaari kang makakuha ng aming kung-paano na mga artikulo sa iyong inbox sa bawat araw para sa libre. Just enter your name and email below: Ilagay lamang ang inyong pangalan at email sa ibaba:



Thanks for this tip. Salamat sa tip na ito. I was trying to get Mac OS 10.4.something to access a samba share on my Ubuntu file server and this did the trick. Ako ay trying sa kumuha Mac OS 10.4.something upang ma-access ng isang samba ibahagi sa aking server Ubuntu file at ito did ang lansihin. One small detail to note is that /etc/samba/smbusers file did not exist on my system (feisty fawn). Isa sa mga maliliit na detalye upang tandaan na ang / etc / samba / smbusers file ay hindi umiiral sa aking sistema (feisty usa). However, just creating the file is the designated directory was all I had to do. Gayunman, ang lamang sa paglikha ng file ay sa itinalagang direktoryong ito ay ang lahat ko ay gawin.
I have no success with this method. Wala akong tagumpay sa ang pamamaraan na ito. I have installed Samba on a Debian Linux box and trying to connect from a Windows XP professional box. Ako na-install ng Samba sa isang kahon ng Debian Linux at sinusubukan mong kumunekta mula sa isang kahon sa Windows XP professional. On the Windows box I have logged on using my corporate domain account. Sa Windows kahon ko ay may naka-log in sa paggamit ng aking corporate domain account. I created an /etc/samba/smbusers file and tried with both username= “domain\windows username” and username = “windows username”. Ako nakabuo ng isang / etc / samba / smbusers file at tried sa parehong username = "domain \ windows username" at username = "windows username". It always prompts me for an username/password box. Ito ay palaging hiningi sa akin para sa isang username / password na kahon. Am I missing something here ? Ako ba ay isang bagay na nawawala dito? Thanks. Salamat.
Thanks! Salamat!
Sweet, that worked. Sweet, na nagtrabaho. Like Atomicron, I had no file at /etc/samba/smbusers, but that was apparently not necessary for me. Tulad ng Atomicron, ako ay walang file sa / etc / samba / smbusers, ngunit iyon ay tila hindi na kailangan para sa akin. Just running the smbpasswd command was enough to get the user access. Basta ang pagpapatakbo ng smbpasswd na utos ay sapat na upang makakuha ng access ng user.
I assume the difference is just due to newer versions of Ubuntu/Samba, as this was originally posted over a year and a half ago. Akala ko ang pagkakaiba lamang ay dahil sa mas bagong bersyon ng Ubuntu / Samba, bilang na ito ay orihinal na posted sa loob ng isang taon at kalahati ago.
Hi, Hi,
I need to create multiple user in samba server not one by one, At the same time have to create multiple user. Kailangan ko bang gumawa ng maramihang gumagamit sa samba server na hindi isa-isa, Sa parehong oras na gumawa ng maramihang mga gumagamit. how to create this?? kung paano gumawa ito?
I am running Samba on Xubuntu, and your method did not work for me. Ako ay tumatakbo Samba sa Xubuntu, at ang iyong mga paraan ay hindi gumagana para sa akin. Here is what I had to do: Narito ang kung ano ako had sa gawin:
(in curlies are variables you must change for your own setup) (sa curlies ang mga variable na kailangan mong baguhin para sa iyong sariling setup)
sudo useradd -s /bin/true (user-name) | this creates the user sudo useradd-s / bin / tunay (user-name) | ito ay lumilikha ng gumagamit
sudo smbpasswd -L -a (user-name) | this will prompt you for a password sudo smbpasswd-L-isang (user-name) | ito ay prompt mo para sa isang password
sudo smbpasswd -L -e (username) | this enables the user sudo smbpasswd-L-e (username) | ito ay nagbibigay-kakayahan sa gumagamit
–and then to verify– -At pagkatapos ay upang mapatunayan -
smbclient -L (your server name) -U(user you created) smbclient-L (ang iyong pangalan ng server)-U (user nilikha mo)
–I didn't create these steps, I just copied them from other sources and they worked for me on Xubuntu– -Hindi ko gumawa ng mga hakbang na ito, ako makatarungan kopyahin ang mga ito mula sa iba pang mga pinagkukunan at sila ay nagtrabaho para sa akin sa Xubuntu -
I'm sorry, but your “howto” won't work. Sorry, ngunit ang iyong "howto" ay hindi gagana. Samba needs a unix user! Samba ay nangangailangan ng isang Unix user!
$ sudo adduser blah $ Sudo adduser blah
$ sudo smbpasswd -a blah $ Sudo smbpasswd-a blah
Is the correct way. Ay ang tamang paraan. If you run a ldap backend, you can run: Kung tatakbo ka ng isang LDAP backend, maaari mong patakbuhin:
$ sudo smbldap-useradd -a blah -P $ Sudo smbldap-useradd-a blah-P
and smbldap-tool will take care of unix user creation. at smbldap-kasangkapan ay magdadala sa pag-aalaga ng Unix user paglikha.
Thanks…this was the simplest solution to the problem. Salamat ... ito ay ang pinakasimpleng solusyon sa problema. I always seem to forget how to do this when I reformat and this was very concise and direct to the point. Ako palaging mukhang nakalimutan kung paano gawin ito kapag ako ay nag reformat at ito ay napaka-maigsi at diretso sa punto. Thanks! Salamat!
I disagree with James, Bobs instructions worked great. Hindi sumasang-ayon ako sa James, Bobs tagubilin nagtrabaho malaki.
I did not create and Linux\Unix accounts. Hindi ko gumawa at Linux \ account Unix.
Created samba users as follows and accessed the shares from Windws Xp clients. Created samba mga gumagamit ng mga sumusunod at na-access ang mga gumagamit mula sa mga kliyente Windws Xp.
sudo useradd -s /bin/true (user-name) | this creates the user sudo useradd-s / bin / tunay (user-name) | ito ay lumilikha ng gumagamit
sudo smbpasswd -L -a (user-name) | this will prompt you for a password sudo smbpasswd-L-isang (user-name) | ito ay prompt mo para sa isang password
sudo smbpasswd -L -e (username) | this enables the user sudo smbpasswd-L-e (username) | ito ay nagbibigay-kakayahan sa gumagamit
–and then to verify– -At pagkatapos ay upang mapatunayan -
smbclient -L (your server name) -U(user you created) smbclient-L (ang iyong pangalan ng server)-U (user nilikha mo)
All created samba user accounts were also accessable from webmin Web GUI console. Lahat ng nilikha samba user account ay magagamit din mula sa webmin Web GUI console.
Al: you should learn that “useradd” creates a _linux_ account (user), not the samba one. Al: Dapat ninyong malaman na ang "useradd" lumilikha ng isang _linux_ account (user), hindi ang samba isa.
The only difference to a regular user is that its shell is set to /bin/true (ie no shell, the command would just return “true” return code) and therefore such a linux user cannot login on console/GMD/KDM/SSH… Also, even that the user is added /etc/passwords, its home directory is not created. Ang pagkakaiba lamang sa isang regular na user ay na ang mga hukay ay naka-set sa / bin / tunay na (ibig sabihin walang shell, utos ay bumalik lamang ang "true" bumalik code) at sa gayon ay tulad ng isang linux user ay hindi maaaring mag-login sa console / GMD / KDM / SSH ... rin, kahit na ang gumagamit ay idadagdag / etc / password, ang kanyang tahanan na direktoryo na ito ay hindi nilikha.