I have a linux server and a Windows server. On Linux was installed and configured Samba to share 2 directories to the windows server. In /etc/samba/smb.conf we have:
[Myapp PDF Reports]
comment = Reports
browseable = yes
path = /var/www/myapp/reports_pdf
printable = no
guest ok = no
read only = no
create mask = 0700
[Myapp PDF Vault]
comment = PDF Vault
browseable = yes
path = /var/www/myapp/PDFvault
printable = no
guest ok = no
read only = no
create mask = 0700
In windows I see the 2 shares under the linux server, but I don't know which user I have to use to connect to them (unfortunatly I can't ask to the person implemented them some years ago). How can I see in Linux r Windows which is the user with the right permission to access these 2 shares and then get the relative password?
Kind regards, Matteo
If you login to the Samba server, you can run the following command to list valid Samba users:
The above command will list users known to Samba - this is not the same as the users and passwords known the Linux server it is running on. Read that last sentence again.
If you don't know the passwords for the old users, you have a couple of choices:
I think the first option is less desirable because it means if there are clients that know the old password and you change it, they will suddenly stop working.
So, I would add a new Samba user. This new user must have a login name on the Samba server, so either choose an existing Linux username you want to use, or add a new one. Here's a way to add a user called
samba:sambaas a regular user with a regular Linux loginsambaas a Samba usersambaThat looks like:
Now you should be able to mount the shares with
username=sambaand the password you just set.