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 :) |
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 |
You were right:
Code:
smbpasswd -a john_doe 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. |
Hi.
Thanks for that. Do you mean like adding the mapping manually in the smbusers file? Thanks Craig |
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 Code:
john_doe = johnd Code:
john_doe = johnd djohn Code:
john_doe = *john* |
Great thanks for that!!! I'll give it a go.
Thanks again! Regards, Craig |
All times are GMT -5. The time now is 06:54 AM. |