LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2004, 06:52 PM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Samba - Adding users


Hello.

I have looked everywhere and read every man page to no avail. All I want to know how to do is to add a samba username, which is different to the local username.

For example.

Local user = john_doe

I want user john_doe to be able to log in using the smb username johnd for example.

I used to do this with the /usr/bin/smbadduser command which was in RH9. However this command isn't in RHEL3, the Fedora's, or Gentoo (as far as I can see).

Reading through all of the man pages the only way I can see that you can do this is with the smbpasswd -a john_doe command.

Is this correct? Or am I missing something simple?

All I want to be able to do is have different local usernames to the smb usernames?

If anyway can help me out here that would be great!!!

PS. I don't want to use redhat-config-samba.

Thanks
Craig
 
Old 07-26-2004, 07:32 PM   #2
Simon_6162
Member
 
Registered: Jul 2004
Location: UK
Distribution: Fedora, Gentoo, Redhat Enterprise
Posts: 141

Rep: Reputation: 16
personally on redhat systems i use

redhat-config-samba
or for none redhat systems download samba-SWAT

bot are nice graphical way to control samba

the hard way (fast way ) is just type in the use map into
/etc/samba/smbusers

in the form :
Unix_name = SMB_name1 SMB_name2
then i think you run smbpasswd SMB_name1
 
Old 07-26-2004, 10:30 PM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You were right:

Code:
smbpasswd -a john_doe
Is the correct command to add a Samba user.

However, to have people login with a different name than that one (like you said you would want johnd to mean john_doe) you need to use a username map.
 
Old 07-26-2004, 11:02 PM   #4
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Hi.

Thanks for that. Do you mean like adding the mapping manually in the smbusers file?

Thanks
Craig
 
Old 07-26-2004, 11:38 PM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
To create a usermap, you would do this.

1. Add the line "username map= \etc\samba\usermap" to the global section of your smb.conf. The file name and path don't actually matter, it can be whatever you chose, so do what works for you.

2. Create the file that the "username map" parameter is pointing to

3. In that file, add the username maps in the following format:
Code:
LocalUserName = SMBUserName
So yours would look like this:
Code:
john_doe = johnd
You can do it with mutliple names as well, like:
Code:
john_doe = johnd djohn
You could even use a wildcard so any names containing a certain string can equal a local user name:
Code:
john_doe = *john*
 
Old 07-26-2004, 11:46 PM   #6
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Great thanks for that!!! I'll give it a go.

Thanks again!

Regards,
Craig
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding users for Samba 3.0 mamakin Linux - Newbie 1 09-04-2004 11:25 PM
Adding samba users aroop Linux - Networking 2 06-07-2004 11:24 PM
Adding New Users guygriffiths Linux - General 4 10-13-2003 10:11 AM
Win2k adding users from Samba Domain krunkwick Linux - Networking 1 07-31-2002 08:04 PM
Adding samba users bripage Linux - Networking 2 01-27-2002 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration