[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-programming-e
Subject:    Re: re[2]: [suse-programming-e] useradd
From:       Christopher Mahmood <ckm () suse ! com>
Date:       2003-03-28 0:37:13
[Download RAW message or body]

* Greg Freemyer (freemyer@norcrossgroup.com) [030327 16:15]:
> [pid 21991] rename("/etc/passwd+", "/etc/passwd") = -1 EBUSY (Device or resource busy)

That sounds like what should happen.  From rename(2):

EBUSY  The  rename fails because oldpath or newpath is a directory that is
       in use by some process (perhaps as current working directory, or as
       root directory, or because it was open for reading) or is in use by
       the system (for example as mount point), while the system considers
       this  an error.  (Note that there is no requirement to return EBUSY
       in such cases - there is nothing wrong with doing the rename anyway
       -  but it is allowed to return EBUSY if the system cannot otherwise
       handle such situations.)


It's easy to duplicate this and see that's it's nothing specific to
yast or useradd:

hades:/tmp # mkdir test && touch test/motd
hades:/tmp # mount --bind /etc/motd test/motd 
hades:/tmp # mv test/motd test/foo
mv: cannot move `test/motd' to `test/foo': Device or resource busy

I don't think you mentioned why you want your passwd and shadow file
in a directory other than /etc/ but you can probably do this chroot.

-- 

-ckm

-- 
To unsubscribe, email: suse-programming-e-unsubscribe@suse.com
For additional commands, email: suse-programming-e-help@suse.com
Archives can be found at: http://lists/archive/suse-programming-e

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic