LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   adduser scripts in the samba.conf (https://www.linuxquestions.org/questions/linux-server-73/adduser-scripts-in-the-samba-conf-867268/)

nass 03-08-2011 01:35 PM

adduser scripts in the samba.conf
 
Hell oeveryone!
I am abit fuzzy about the usage of adduser script directives in the smb.conf.
I pressume they give you the ability to add users directly from windows machines... or not?
and how can I use them?

Thank you for your clarifications

frankbell 03-08-2011 09:26 PM

I'm not sure, but I think the adduser command needs to be run on the samba server.

As for the rest, this is easiest to understand Samba Guide I've found:

Samba by Example

It starts with real simple examples and proceeds to complicated ones.

nass 03-09-2011 03:04 AM

I have gone through this tutorials by example (and not only those) on numerous occasions in my experience with linux.
No apparent solution has come to my attention.

if you run the adduser command from a linux terminal necessarily, then what is the purpose of the directive in the smb.conf?

I ideally would like to avoid having to logon a terminal to add users. and in fact, i would prefer not to have to run both the useradd and smbpasswd -a commands...

I'm really looking for 'processed' answer here, cause it is not apparent to me exactly how samba can be utilised.

Thank you

yoachan 03-09-2011 03:41 AM

I think you can use web based interface such webmin and SWAT.
I never actually use any of those to configure SAMBA, but I know both tools are working.
You can access those interfaces directly from your Wind0ws machine's browser.

regards
cnz

nass 03-09-2011 03:50 AM

i'm afraid you need to have added a user by terminal in order to be able to enable or disable them from the SWAT interface.
I have no idea about webmin, can someone verify any of the 2 statements?

jamrock 03-09-2011 05:46 AM

The add user script is used to add users to Samba. It gives you some flexibility re: the tool you use to add users.

You can add users to Samba from the Linux command line. This is good if you understand Linux. If Samba is being managed by a Windows admin. this might be an issue.

You can use the Windows NT 4.0 User Manager for Domains to add users to Samba. User Manager for Domains cannot add users to a Linux box by itself. However it can be configured to pass the instructions to the add user script.

On my system we run User Manager for Domains on a Windows XP machine. The usrmgr.exe is located on the Samba server but we run it from XP.

When we add a user in User Manager for Domains, it calls the add user script and the add user script adds the user. When we want to delete a user, User Manager for Domains calls the delete user script and the delete user script deletes the user.

In summary, the add user script allows you to use a non-Linux GUI tool to add users to the Linux machine.

nass 03-09-2011 05:50 AM

i see, so you need a windows frontend to use it though.. that was mostly my missing piece..
I wonder though, since the the 'add user script' calls 'useradd' command, then WHO calls 'smbpasswd -a' ? :)

jamrock 03-09-2011 07:45 AM

Quote:

i see, so you need a windows frontend to use it though.. that was mostly my missing piece..
I don't know if it is only used with the Windows front end. That is the way I use it.

Quote:

I wonder though, since the the 'add user script' calls 'useradd' command, then WHO calls 'smbpasswd -a' ?
Samba is an advanced topic. There are several ways that you can configure user authentication. I use OpenLDAP to store user information. The addition of the Samba information and the Posix (Linux) information is managed by the add user scripts provided with the smb-ldap tools.

Chapter 5 of Samba by Example goes step by step into the configuration of Samba as a PDC. It would be a good place to start your reading. The document is available at www.samba.org.

yoachan 03-09-2011 09:46 PM

Quote:

Originally Posted by nass (Post 4283891)
i'm afraid you need to have added a user by terminal in order to be able to enable or disable them from the SWAT interface.
I have no idea about webmin, can someone verify any of the 2 statements?

I verify my own statement about webmin.
It has this features under "Samba Users" feature:
Edit Samba users and passwords
Convert Unix users to Samba users
Configure automatic Unix and Samba user synchronisation
Add and edit Samba groups
Configure automatic Unix and Samba group synchronisation
Bind to Domain
so it can convert unix users to samba user, but you can't create a samba user out of thin air.


All times are GMT -5. The time now is 04:53 PM.