What's new

Is smb.postconf working?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

DonChino

Occasional Visitor
Simple problem. I basically wrote a script to allow "anonymous" access to a PUBLIC samba share while "hiding" the entware folder from the network.

If I run the script manually with ./smb.postconf then everything works, but when I reboot it does not work. It seems like my script in the /jffs/scripts folder is not being run automatically. I do not have other scripts, but I am starting with smb.postconf and wondering if anyone else is having this problem or if there is something else I am supposed to do?

Yes, activated JFFS custom scripts. Yes, I am logging on with PuTTY and can SSH and everything. I can see all the files in question and I can see the changes being made to /etc/smb.conf but only when I run it manually. I can even see that the entware folder "disappers" from "My network places" in Windows. So everything seems to be working but this is not running automatically with reboot.

I am on Firmware version: 380.64 on RT-AC68U, but I will upload my script file for others to leverage... ;)
 

Attachments

  • smb.postconf.txt
    630 bytes · Views: 476
Simple problem. I basically wrote a script to allow "anonymous" access to a PUBLIC samba share while "hiding" the entware folder from the network.

If I run the script manually with ./smb.postconf then everything works, but when I reboot it does not work. It seems like my script in the /jffs/scripts folder is not being run automatically. I do not have other scripts, but I am starting with smb.postconf and wondering if anyone else is having this problem or if there is something else I am supposed to do?

Yes, activated JFFS custom scripts. Yes, I am logging on with PuTTY and can SSH and everything. I can see all the files in question and I can see the changes being made to /etc/smb.conf but only when I run it manually. I can even see that the entware folder "disappers" from "My network places" in Windows. So everything seems to be working but this is not running automatically with reboot.

I am on Firmware version: 380.64 on RT-AC68U, but I will upload my script file for others to leverage... ;)

I think not every script in /jffs/scripts directory is started automatically. There are some "reserved" names for that. My feeling is that you should include your code in the script named "post-mount", but not quite sure. Read Merlin's wiki for more info.
 
A couple of changes to your script.....

CONFIG=/etc/smb.conf to CONFIG=$1 (the name is passed as a parameter)

remove all the process kill and restart code, not needed and is probably mucking things up. The .postconf scripts aren't meant to be run standalone from the command line.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top