padavanfirmware / rt-n56u

Padavan Firmware
http://padavanfw.net/
6 stars 4 forks source link

Samba permission after account edit #162

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take a working neighborhood share account, verify that it works properly and 
allows access as specified in the USB Share permission settings in the WEB GUI.
2. Change the user name and password of the working account using the edit 
feature.  Apply changes.  Reboot router, Reboot local PC.
3. Try to access the share destination using the newly created user name and 
password.

What is the expected output? What do you see instead?
Expect access to share drive/directory destination upon authentication.
Actual result:  denied access due to permissions issue (in my case via a 
windows pop-up window(WIN7))

What version of the product are you using? On what operating system?
Using RT-N56U_1.0.1.8d-p3 with optware enabled and working, no swap dir.  The 
only reason I am using optware manager is because I configured firewall scripts 
to block LAN to WAN by MAC.  I have two disks plugged into the router.  One is 
a thubdrive with a 10gig ext3 partition.  The other disk plugged into the other 
usb port is a 3tb external drive with movie and music files on it.

Windows 7 PC operating system on local PC.

Please provide any additional information below.
I went into router OS with ssh and saved a copy of /etc/samba/smbpasswd.  I 
then deleted the data in /etc/samba/smbpasswd and rebooted the router.  This 
did not fix the problem.  Right now I am able to use my shared drive (movie and 
music files) by having "neighborhood share with accounts" disabled via the WEB 
GUI.

When I flashed the new firmware onto the router, my previous configuration 
stayed.  The Samba user accounts and passwords were all working as expected.  
This problem only revealed itself when I edited the accounts by user name and 
password.

I searched the WIKI and Open Issues threads but I did not find this problem 
reported or with a solution.  I love the firmware and I appreciate all of the 
hard work you guys have done.  Thank you!

Original issue reported on code.google.com by kevin.n....@gmail.com on 10 Mar 2012 at 10:31

GoogleCodeExporter commented 9 years ago
Hello, 

Have you granted access to the new user to directories which were created by 
previous user?

Original comment by d...@soulblader.com on 12 Mar 2012 at 3:50

GoogleCodeExporter commented 9 years ago
Yes, password access was granted to the new user/account to specific 
directories using the WEB GUI; however, user was not able to open the 
directories using the new credentials.  The only way user could access the 
directories, was to disable "share with account" feature.

Original comment by kevin.n....@gmail.com on 12 Mar 2012 at 11:30

GoogleCodeExporter commented 9 years ago
I got the same bug at the same hardware. I think, the bug is in rewriting of 
all samba configs by Web GUI to defaults after every rebooting.
And it is impossible to fix anything manually in GUI.
It would be a great idea to fix this bug and then provide any Wiki about proper 
editing samba configs on RT-N56U.

How to filter external users connecting to VPN server by their MAC?
Is it possible to provide "MAC filtering" in "VPN server" page?

With great thanks, Serge S.
Donate you soon!

Original comment by skurydi...@gmail.com on 13 Mar 2012 at 9:20

GoogleCodeExporter commented 9 years ago
Is it possible to provide "MAC filtering" in "USB Application"->"Network 
Neighborhood Share" page?

Original comment by skurydi...@gmail.com on 13 Mar 2012 at 9:23

GoogleCodeExporter commented 9 years ago
2 skurydinsv:
First, I thought you're going to filter users who are trying to connect to 
Samba share. Because the issue topic is  quite different! =)
I don't think this option is so vital to be placed to web GUI. But it is 
possible by adding several rules to iptables.

Original comment by d...@soulblader.com on 17 Mar 2012 at 12:41

GoogleCodeExporter commented 9 years ago
d...@soulblader.com:  I agree, the MAC filtering issue should be listed as a 
separate issue. 

Regarding the problem as I described it originally, can you or anyone suggest 
particular path/files that I can look in to see how the credentials are getting 
corrupted (if it is the case)?

Original comment by kevin.n....@gmail.com on 21 Mar 2012 at 4:35

GoogleCodeExporter commented 9 years ago
to Kevin: I can confirm this issue. I don't know the solution now =(
As for me, I do not use Samba at all. It is switched off in settings. I prefer 
NFS. But I tried to change it in settings and haven't succeed yet =(
I'll let you know if I find the solution!..

Original comment by d...@soulblader.com on 21 Mar 2012 at 5:20

GoogleCodeExporter commented 9 years ago
Dear Gurus, please, be so kind to write how to manage NFS Server on 
ASUS_RT-N56U or any WiKi examples.

Original comment by skurydi...@gmail.com on 26 Mar 2012 at 7:06

GoogleCodeExporter commented 9 years ago
2 skurydinsv:
And what would you like to know?..
Its reads configuration from /etc/exports (as usual)
By default the share path is /media/AiDisk_{x,y}. Any host in local network can 
mount it.

You can search in Google about it. I'm sure there are many articles, manuals 
and guides...

As for me, I don't use samba at all. NFS is much faster, I can work with files 
like they are on my local machine. If it becomes inaccessible, all 
applications, which worked with it just wait until it becomes accessible again. 
Nothing drops.  (I haven't had such occasions with router actually, but I used 
nfs before on Linux)

Original comment by d...@soulblader.com on 26 Mar 2012 at 7:57

GoogleCodeExporter commented 9 years ago
Concerning new firmware, it would be great to provide separate web page with 
"SAMBA file server" as it was made for VPN server. And also to throw out ugly 
samba configs from USB setup wizard as it was made for QoS service...
Samba is preferable to NFS due to its usage on android tablets, Mac, etc.

Donate you soon!

Original comment by skurydi...@gmail.com on 27 Mar 2012 at 6:30

GoogleCodeExporter commented 9 years ago
As far as MacOS and Android are Unix based systems, I'm sure NFS share could be 
easily mounted to these devices. For example, you can download busybox from 
android market and mount it with: # busybox mount my.router:/media/AiDisk_a1 
/mnt. I'm also sure there are some applications with GUI. Samba is "too big and 
too heavy" I think.

Original comment by d...@soulblader.com on 27 Mar 2012 at 7:06

GoogleCodeExporter commented 9 years ago
My Archos 101 tablet supports automatic mounting of samba folders for every
WiFi connection, which supports its sharing.
I don't want any head ache with NFS auto-mounting in Android every reboot.
As I googled, Android's busybox does not support execution of mounting
scripts at tablet startup.
Thanks for great job!

Original comment by skurydi...@gmail.com on 27 Mar 2012 at 7:28

GoogleCodeExporter commented 9 years ago
I'm not sure, but I think there should be 'rc.local' file (possibly in /etc 
directory.
(I don't have any device based on android, so I can't check =/)
User can use this start-up script in Linux.
(Android is a Linux-based system as it is written in Wikipedia)

So, if you add some code to this file, it will be executed every time on boot 
by root user.

Original comment by d...@soulblader.com on 28 Mar 2012 at 4:41

GoogleCodeExporter commented 9 years ago
Great thanks!
Mounting scripts were found in /init.rc
Can you help me with its editing?
Can you send any template with NFS rules for USB directories in Asus RT-N56U?

Original comment by skurydi...@gmail.com on 28 Mar 2012 at 7:33

Attachments:

GoogleCodeExporter commented 9 years ago
Well, first create a directory using file manager. Then try to get the full 
path of this directory. (it will probably be smth. like /mnt/storage/.... )

Then get share path on your router: # cat /etc/exports

After that, try to mount NFS share using the command line:
# busybox mount my.router:/media/AiDisk /mnt/storage/.... (to dir, which was 
created)

If everything is fine, it can be added to script, which you've attached (I'm 
not sure if have enough rights to do it as a user)

you should change file bits in folder which you'd like to have write access on 
router.

Do not do the following to the whole disk if you have '/opt' directory with 
Optware packages in it.

# chmod -R 777 /media/AiDisk_a1/path_to_folder_you_need
this will means that any user can read, write and execute files in this 
directory and directories included in this one...

Original comment by d...@soulblader.com on 28 Mar 2012 at 10:17

GoogleCodeExporter commented 9 years ago
Any word on getting this resolved?

Original comment by Qst...@gmail.com on 6 Jul 2012 at 12:00

GoogleCodeExporter commented 9 years ago
No, the issue is not resolved.
Will you be so kind to adapt samba configurations to Wiki CommonTips from the 
site below:
http://teis.org.ua/opensuse-services/nastroyka-sambyi-samab-kak-master-browser/
Please, give an example of smb.conf in WiKi, based on the link above.

Usage of NFS client for my home samba shares is not prefered at office 
computers. Built-in NFS client is available only in Win7 Ultimate, which is not 
used to be installed in offices. Thus, usage of NFS is not a decision.

Original comment by skurydi...@gmail.com on 24 Mar 2014 at 12:12