Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
In addition to the files : /etc/group, /etc/passwd and /etc/shadow, I could see three files in my linux machine.
/etc/group-
/etc/passwd-
/etc/shadow-
I cannot see these files in my root filesystem. But when I try to add one user using useradd command, these files seem to get generated.
So i would like to know when exactly is these files created and what is the use of these files?
These are backups of previous versions.
Manual pages show these files and states:
/etc/passwd-
Backup file for /etc/passwd.
/etc/shadow-
Backup file for /etc/shadow.
Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools.
See http://manpages.ubuntu.com/manpages/oneiric/man5/shadow.5.html and http://manpages.ubuntu.com/manpages/oneiric/man5/passwd.5.html
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I learned that open files can not be removed/renamed in Windows but can be removed/renamed in Linux (by default). I think I understand the reasons of the Windows behaviour.
Now I wonder why Linux allows remame/remove of open files ? What was the design rationale behind this decision ? What are the use cases when one need it ?
the difference is that linux works on file handles rather than file names. as long as the file handle is valid you can read and write to it.
renaming a file in linux does not alter the file handle.
one very interesting use case is to delete temp files after opening them.
this makes it impossible for every other process to access this file, while the process that owns the file handle can still read and write.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
What I would like to is create a directory that belongs to a group and each of those member can create, edit & remove files.
chgrp OldGroup NewGroup
chmod g=rwx
That's what I learned, but now my big problem is that I need to make sure people from that group can only delete their own files.
I am not sure how to put these rights,
if you have any ideas, please share them!
Thnx for reading.
did you try setting sticky bit?
chmod 1775 /directory/with/group/files
when the sticky bit is enabled on a directory, users (other than the owner) can only remove their own files inside a directory. This is used on directories like /tmp whose permissions are 1777=rwxrwxrwt
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to copy files from one hard drive to another in my home server using the cp command. I am copying from an NTFS-formatted partition to an ext4 partition on a new hard drive I have installed.
Is it possible for the cp command to corrupt the transferred files?
Should I be using something like rsycn to verify file integrity is checked upon completion instead?
I would use rsync.
rsync can give you additional checksums, but the real power is the ability to resume after interruptions. This really helps for large files like VMs.
This really is more a serverfault question - See copying-a-large-directory-tree-locally-cp-or-rsync.
rsync should be better than cp when copying files.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When I made two soft links in a directory pointing to each other
eg.
abc->xyz and xyz->abc
I was not able to open that directory graphically in ubuntu.
When I clicked that dierctory it instantly opened and that gets closed immediately.
what may be the reason for that and how can it be sorted except deleting those soft links?
You probably mean circular symbolic links (or symlinks). What would you expect? Any open(2) (or others) syscall would fail with errno set to
ELOOP Too many symbolic links encountered while traversing the path.
You should remove one of the links, with the unlink(2) syscall, e.g. called by the rm command; so you could open a terminal, cd to the directory containing that mess, then
rm -v abc xyz
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Linux and Apache suffix a bunch of files and folders with d or .d.
init.d
rc.d
/etc/httpd/conf.d
/etc/httpd/vhost.d
What is the meaning of this convention?
It means simply "directory" and commonly indicates that either a single file, or a directory full of them is acceptable for configuration.
(In the case of rc.d, that replaces the old-style Unix /etc/rc script which is no longer used on Linux.)
Means "a directory", containing a bunch of files intended for the same goal (init scripts in init.d, configuration files in conf.d, etc.) - this tendency seems to have expanded onto separate files, too.