Page 1 of 1

moving passwd and shadow

Posted: Wed Jul 16, 2003 1:47 am
by Stryker
Is there any way I can have the passwd and shadow files in a place that's not /etc? for instance, /settings/system? I'm trying to simplify the filesystem structure for a distro i'm making. I want things to be a little different. passwd and shadow are 1 that i cannot figure out though. Any advice is much appreciated.


Posted: Wed Jul 16, 2003 5:23 pm
by Void Main
I think you will break a lot of things if you move those files. They have been in /etc on all *NIX like systems from the beginning of time (actually some OSs put the shadow file elseware). Many programs use /etc/passwd but of course I'm not saying you can't do it, just that you will have to modify the source of every program that uses them. I'm sure programs like "login", "pam", "passwd", etc would be hard coded to look for them in /etc and would have to be changed.

And you will also be breaking the standards, something only Microsoft is really good at to this point. See:

Posted: Wed Jul 16, 2003 5:35 pm
by Stryker
well, i'm not really looking to move them exactly. I just want to rename etc. I don't want people to go: "hmm. etc, what's that? This is haaaard". I'm just looking for something like renaming etc to settings or system or something. I suppose looking into those programs' source would be a good start. Hopefully I'll get lucky and it's just 1 constant.

Posted: Wed Jul 16, 2003 5:51 pm
by Void Main
I believe it would be harder if you renamed them because if they do have any Linux or UNIX experience then they'll automatically know that /etc/passwd is the file they are looking for. If they learn on yours, then go to another system, everything is different. Personally, not following standards makes life harder if you ask me. Where's the passwd file in M$ systems? Now *that* is hard. :) Now what you *could* do is create a /system/settings directory and then put symbolic links to all the files you want with whatever name you want. You won't have to hack/recompile any software and you also get the luxury of being able to see where the real files are. This would be good for beginners.

Posted: Thu Jul 17, 2003 10:18 am
by Calum
i would strongly recommend symlinking as the most radical solution that i would tolerate if i were you, setting up a new filesystem structure. I get angry at the different locations of the XF86Config file (like /etc/XF86Config, /etc/X11/XF86Config, /etc/X11/XF86Config-4 and so forth) so you can imagine how pissed off i would be if i tried a distro and the filesystem structure had all been pissed about so much that it resembled mswindows' braindead directory structure! this was one of the reasons i dismissed redmond/lycoris desktop linux for my own use.

leave it as /etc/ because that is the simplest, most logical solution and it is where people will expect it. symlink if you must. why not just symlink all the normal unix locations to a bunch of meaningless files with in a directory called /WINNT if you really want to catch the windoid crowd?