DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-06-07 20:49:39

epswing
New member
Registered: 2008-06-07
Posts: 1

network access / permission issues

Either I'm missing something, or the stock Network Access provided with the 323 doesn't make any sense whatsoever.

I hope I'm just missing something.

This should be a very typical use case: I have a folder called Volume_1/stuff, and I'd like to give ALL read access to it, and a specific user read/write access to it.  When I do this though the web interface, there are TWO shares available: stuff and stuff-1.

First of all, I'm not expecting to see two shares.  I want ONE share which different users have different access to.  Is this not how shares work?

Secondly, I don't see any opportunity to edit the names of the shares I create.  If I have a folder Volume_1/pics/epswing and another folder Volume_1/docs/epswing, I have no opportunity to name the shares epswing-pics and epswing-docs, I have to actually name the folders Volume_1/pics/epswing-pics and Volume_1/docs/epswing-docs to avoid seeing the shares as epswing and epswing-1.

Am I the only one who's noticed this right off the bat, or am I missing something?

Offline

 

#2 2008-06-07 21:01:08

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: network access / permission issues

That is how the web interface works.  Keep in mind, this is a simple low cost device.  You can set up a script via fun_plug and telnet to make these however you want.  I also believe you can do this through the backup file, but you can brick the unit if you do it wrong.  The bigest reason people brick the unit while attempting this is that they edit the file in windows and it adds CR/LF line endings, instead of the required LF ones used by Linux.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#3 2008-08-12 16:36:29

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

I'm in the same boat as epswing.  I just got a DNS-323 & put two 500GB mirrored drives in it.  I tried to set up user access & it will only allow a user to be in one group at a time & I can't give read only access to most users & read-write to select users on specific volumes.  There's got to be a relatively easy way to do this.  I would think this would be a basic configuration that almost everyone would want to set up.  Has anyone made a custom firmware to accomplish this?

Thanks!

Mike

Offline

 

#4 2008-08-12 17:18:05

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: network access / permission issues

fsjmike wrote:

There's got to be a relatively easy way to do this.

The good news is the underlying software responsible for allowing Windows OS access to the
DNS-323 drives (Samba v3.0.24) does support this; however, (the bad news) the D-Link provide
web GUI does not allow you to modify the smb.conf (Samba configuration) file to make this possible.

To achieve your goal, you have to manually edit the smb.conf file and add the samba option needed to
run they way you want.  You will need telnet access to the DNS-323 via Fonz's Fun Plug http://dns323.kood.org/howto:ffp,
and a bit of samba knowledge http://us6.samba.org/samba/docs/man/Sam … #id2544263
to choose the right options.

There are many posts on this forum discussing similar Samba customizations you may want to read
http://dns323.kood.org/forum/t1675-user … es%3F.html

The determination of whether this is "relatively easy", is left up to you.


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#5 2008-08-12 19:03:24

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

Thanks Mig!

I got fonz's fun plug running & I think I know what Samba options I need to change, but I'm not sure how to find/edit the smb.conf file?  I can find the ffp dir & I have telnet open with just a / # sign prompt.  I'm using an XP box to do this, so I believe I'll need a special text editor to do this also.  Which one do you suggest?

Thanks again,

Mike

Offline

 

#6 2008-08-12 22:20:34

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: network access / permission issues

The Samba config file is located at /etc/smb.conf   You can use the 'vi' or 'nano' editor to edit the file
within the telnet session.  Also the default smb.conf will be rewritten from flash on reboot
so you need to store your customized version on the hard drive /mnt/HDa2/<somewhere>
and copy it to /etc directory and restart samba to use the new configuration.
look at http://dns323.kood.org/forum/t1232-wher … ed%3F.html

Last edited by mig (2008-08-12 22:21:05)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#7 2008-08-13 22:58:31

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

Well, I modified the smb.conf & group files & added the copy & restart lines to fun_plug & that part seems to have worked fine.  Unfortunately I can't login to view any files!  Here're the changes I made to smb.conf & groups.  Can anyone tell me what I did wrong?  I was able to access the web_page folder using my username & password, but not volume_1 or any other folders.

/etc/samba # cat smb.conf
[ global ]
interfaces = egiga0
unix charset = ISO8859-1
workgroup = PMP
netbios name = dlink-C8F25D
server string = DNS-323
hosts allow =
hosts deny =
security = user
encrypt passwords = yes
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
max xmit = 65535
create mask = 0777
directory mask  = 0777
force create mode = 0777
force directory mode = 0777
load printers = Yes
printcap name = /usr/local/LPRng/etc/printcap
min print space = 2000
max print jobs = 1000
printing = lprng
print command = /usr/local/LPRng/bin/lpr -P%p -r %s
lpq command = /usr/local/LPRng/bin/lpq -P%p
lprm command = /usr/local/LPRng/bin/lprm -P%p %j
lppause command = /usr/local/LPRng/sbin/lpc hold %p %j
lpresume command = /usr/local/LPRng/sbin/lpc release %p %j
queuepause command = /usr/local/LPRng/sbin/lpc -P%p stop
queueresume command = /usr/local/LPRng/sbin/lpc -P%p start
use sendfile =yes


[ web_page ]
comment = Enter Our Web Page Setting
path = /mnt/web_page
valid users =
read only = yes
guest ok = yes

[printers]
path = /mnt/HD_a2/.lpd
guest ok = Yes
printable = Yes
use client driver = Yes
browseable = No

[ Volume_1 ]
comment =
path = /mnt/HD_a2
valid users = @Everyone-RO
read list = @Everyone-RO
read only = yes
guest ok = no
oplocks =  yes
map archive = yes

[ Public ]
comment =
path = /mnt/HD_a2/Public
valid users = @Everyone-RW
write list = @Everyone-RW
read only = no
guest ok = yes
oplocks =  yes
map archive = yes

[ Quality ]
comment =
path = /mnt/HD_a2/Quality
valid users = @Quality-RW, @Everyone-RO
read list = Everyone-RO
write list = Quality-RW
read only = yes
guest ok = no
oplocks =  yes
map archive = yes

[ QuickBooks ]
comment =
path = /mnt/HD_a2/QuickBooks
valid users = @Quickbooks-RW
write list = @Quickbooks-RW
read only = yes
guest ok = no
oplocks = no
map archive = yes

Group:

/etc/samba # cat /etc/group
root:x:0:root
500:x:500:admin
501:x:501:nobody
QuickBooks:x:702:Majid Gemma Kathy
Quality:x:703:Mike
Everyone:x:704:Mike Lin Shipping Majid Gemma Kathy Production
utmp:x:22:

Offline

 

#8 2008-08-14 02:28:09

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: network access / permission issues

I see a couple of problems...

first the users in a group are separated with a comma

     QuickBooks:x:702:Majid,Gemma,Kathy


second: the valid users / read / write list name needs to match the unix group name preceded by a '@'

    valid users = @Quickbooks

Last edited by mig (2008-08-14 02:29:49)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#9 2008-08-14 03:24:35

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

Thanks Mig, I see it now.  I'll give it a shot in the morning.

Offline

 

#10 2008-08-14 17:39:27

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

I made those changes in Telnet with vi, saved & restarted smb & I still can't browse the folders.  Any idea what else it could be?  Do I need to do something to the passwd file?

Here's a ls -la if it helps:

/ # ls -la /mnt/HD_a2/
drwxrwxrwx   10 root     root         4096 Aug 13 13:48 .
drwxr-xr-x    5 root     root         1024 Aug 13 15:06 ..
drwxrwxrwx    2 root     root         4096 Aug 11 09:24 .lpd
-rwxrwxrwx    1 nobody   501         12288 Aug 12 15:55 .smb.conf.swp
drwx------    5 root     root         4096 Aug 12 10:18 .systemfile
-rwxrwxrwx    1 nobody   501          1057 Aug 12 09:43 Copy of fun_plug
drwxrwxrwx    2 nobody   501          4096 Aug  7 13:49 Production
drwxrwxrwx    2 nobody   501          4096 Aug  7 13:49 Public
drwxrwxrwx    2 nobody   501          4096 Aug  7 13:49 Quality
drwxrwxrwx    3 nobody   501          4096 Aug  7 15:12 QuickBooks
drwxr-xr-x   11 root     root         4096 Aug 12 10:53 ffp
-rw-r--r--    1 root     root       168527 Aug 13 15:07 ffp.log
-rwx------    1 nobody   501          1417 Aug 13 13:48 fun_plug
-rwxrwxrwx    1 nobody   501          1057 Aug 12 09:43 fun_plug~
drwxrwxrwx    2 nobody   501          4096 Aug 13 13:33 samba

Last edited by fsjmike (2008-08-14 18:12:38)

Offline

 

#11 2008-08-15 17:06:20

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

I just noticed that if I put \\IPaddress I can see the folders that are on Volume_1, but I can't login to any of them.  If I use a correct username & password & press OK it brings me back to the same login window, but if I use an incorrect username or password I get an error message that says the device is unavailable. 

Any more ideas on what it could be?

Thanks!

Mike

Just noticed that user was in lower case, I changed it to upper case & restarted smb, but no luck with that either. sad

Last edited by fsjmike (2008-08-15 17:14:18)

Offline

 

#12 2008-08-15 17:35:20

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

OK, here's a little more information.  I added my username Mike to smb.conf under Volume_1 to valid users & write list & I can access Volume_1 & everything under it from \\IPADDRESS, but if I try to access \\IPADDRESS\Public, I can't.  If I access \\IPADDRESS\Volume_1\Public, it works fine.  Then I added Mike to smb.conf under Quality valid users & write list & I can then access \\IPADDRESS\Quality. 
Not quite sure what to make of this other than the groups aren't working yet.

Offline

 

#13 2008-08-15 17:41:34

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

I think I'm getting closer! smile

The post I was using to set up USER access had @sharegroup-RO or -RW under valid users.  I just tried removing the -RO & -RW & now I can view everything, but I can't create files where I should be able to.  I also removed my username from all the volumes & just left myself in the groups I'm supposed to be in.

Last edited by fsjmike (2008-08-15 17:48:19)

Offline

 

#14 2008-08-15 19:55:25

fsjmike
Member
Registered: 2008-08-08
Posts: 11

Re: network access / permission issues

Weird, I just rebooted after saving the modified smb.conf file to where it will get re-written on startup & now if I go to \\IPADDRESS\Public, I can create & delete files, but if I go to \\IPADDRESS\Volume_1\Public, which is how My Network Places works, I can't.

Offline

 

#15 2008-08-15 23:51:24

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: network access / permission issues

That is because \\<dns>\Public is a share and \\<dns>\Volume_1\Public is the share "Volume_1" and the subdirectory "Public".  Your user only has access to share "Public" not share "Volume_1".

See the write up I did in post 7 of this thread: http://dns323.kood.org/forum/t2739-Netw … -Work.html


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB