3

I'm studying LDAP and in my company there is an Active Directory Server. In my workstation is installed Linux Mint.

I try to show the context that arise my question:

  • open a new window for browsing the filesystem of the workstation;
  • in the menu File of the window opened there is the option Connect to Server (see the image added);

Option Connect to Server of the menù File

  • by this option I can select Type: Windows share and authenticate with an account registered in a Windows domain;
  • after that I can browse some network directories where my account is enabled.

Explained the context, I can finally ask the question: by Connect to Server I have used LDAP or something else? Is it possible the same authentication by command line?

Thanks

frankfalse
  • 215
  • 12
  • in addition to the answer below- knowing more about CIFS {SMB} and SAMBA may be of interest to you... https://unix.stackexchange.com/questions/34742/cifs-vs-samba-what-are-the-differences – ron Oct 04 '22 at 15:20

1 Answers1

3

When you connect to a win-server with a share - you are connecting to that file-server. The file-server requires authentication, you supply id and password, the file-server connects to LDAP and checks the password against it. Your machine does not connect to machine with LDAP directly in this case.

If you want to connect to windows' file-server from command line you need to mount the remote share:

mount -t cifs -o username=<win_share_user> //WIN_SHARE_IP/<share_name> /mnt/win_share

You will be prompted for a password. Or you can supply the password in the command line:

mount -t cifs -o username=<win_share_user>,password=<win_share_password> //WIN_SHARE_IP/<share_name> /mnt/win_share

In this case the windows share will be "mounted" to /mnt/win_share folder and you can work with it. The file manager you use in GUI does the same thing, but mounts to a temporary folder which is removed once you disconnect from the share.

And yes, the interaction with LDAP server will again be done from the file-server, not from your machine.

If you want to connect to LDAP server yourself. You need to install OpenLDAP package:

apt install ldap-utils

It will give you several utils, like ldapsearch and ldapmodify which will give you a full access to the LDAP server. With them you would be able to query or manage LDAP server directly from your Linux machine.

White Owl
  • 4,511
  • 1
  • 4
  • 15