Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install or Permission issue #1

Closed
Tonelock2021 opened this issue Jun 22, 2021 · 6 comments
Closed

Install or Permission issue #1

Tonelock2021 opened this issue Jun 22, 2021 · 6 comments

Comments

@Tonelock2021
Copy link

Hello,
Not sure if this is the correct place for this.
I installed cockpit-file-sharing on my newly genned Ubuntu server running Ubuntu 20.04.2 LTS.
the samba file sharing is overlaid with the spinning 45Drives spinning logo and an error shows up "Can't load /etc/samba/smb.conf - run testparm to debug it"

smb.conf does exist and I can edit it as sudo
testparm runs as sudo and has no issues or errors and samba works fine.

My user login to cockpit does have sudo privs and other items in cockpit do get elevated correctly.
perms on smb.conf
-rw-r--r-- 1 root root 9273 Jun 22 16:07 /etc/samba/smb.conf
I am not sure how to proceed.

image

@bkelly16
Copy link
Member

This module uses sambas net registry to store and retrieve configuration settings.
Add "registry = yes" to the global section

[global]
include = registry

@Tonelock2021
Copy link
Author

Thanks for the reply Bkelly16.
My smb.conf already has include=registry . I did try 'Add "registry = yes"' to the global section as suggested and as suspected it failed on testparm so I removed.
I did get to see a bit more of the error today, it reflects a perms error in that the cockpit admin is not acting as sudo, similar to when running testparm as non sudo . The Cockpit user is running "Administrative access" and the user has sudo privs and all seems to work on other modules within Cockpit.

image

this is the results of sudo testparm

# Global parameters [global] log file = /var/log/samba/log.%m logging = file map to guest = Bad User max log size = 1000 netbios name = WAL-R330-2 obey pam restrictions = Yes pam password change = Yes panic action = /usr/share/samba/panic-action %d passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . passwd program = /usr/bin/passwd %u registry shares = Yes security = USER server role = standalone server server string = %h server (Samba, Ubuntu) unix password sync = Yes workgroup = WALECTRIC.LOCAL idmap config * : backend = tdb

@muratgonul
Copy link
Contributor

muratgonul commented Jun 24, 2021

I am having the exact same problem as ToneLock2021.
I was using the earlier version which was cockpit-samba-manager. I removed and reinstalled it while testing, and that one is still working fine.
I am running on Linux helios64 5.10.16-rockchip64 #21.02.2 SMP PREEMPT Sun Feb 14 21:35:01 CET 2021 aarch64.

edit-
Did a little bit more testing. Seems like it works when I log in to the cockpit interface with the root user.
Also noticed that the problem is caused by probably populate_samba_global() function in samba-manager.js

When I type in net conf list to terminal I am getting this same WERR_ACCESS_DENIED error. But sudo net conf list works perfectly fine.

final edit-
opened a pull request for the fix. turns out superuser flag in line 1988 of samba-manager.js was missing

@Tonelock2021
Copy link
Author

That makes sense and seems to address the issue. I did edit my local samba-manager.js to match but it actually got a bit worse, but cockpit is all new to me

@bkelly16
Copy link
Member

bkelly16 commented Jun 25, 2021

Hey everyone,
@muratgonul nailed it, we were missing 'superuser:require". Pull request was merged this morning.
We are going through the rest of the module to verify the rest works as intended.
Thank for the report and the fix !
Closing this issue

@Tonelock2021
Copy link
Author

Yes this is now working for me. The debian images were not updated so apt update cockpit-file-sharing did not work.
I did a git clone make install and a bit of clean up. so now time to play thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants