FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 01-20-2012, 12:11 PM
Olivier Pavilla
 
Default Can't copy /etc/passwd

Hi everyone.

I followed this howto to chroot 32 bits ubuntu distro.
https://help.ubuntu.com/community/BasicChroot
But I got a problem.
I can't copy /etc/passwd to /32bits/etc/passwd
I get this error message:

oliviern@korriban:~$ sudo grep "^[^:]*:x:[0-9][0-9][0-9][0-9]:"
/etc/passwd >> /32bits/etc/passwd
bash: /32bits/etc/passwd: Permission non accordée
olivier@korriban:~$ ls -lha /32bits/etc/passwd
-rw-r--r-- 1 root root 761 2012-01-20 05:49 /32bits/etc/passwd

Does anyone have idea?

--
Olivier Pavilla
http://www.linux-squad.com
"Les fautes d'orthographes de mes propos sont sous licence Ane bâté 1.0"

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-20-2012, 12:22 PM
Basil Chupin
 
Default Can't copy /etc/passwd

On 21/01/12 00:11, Olivier Pavilla wrote:

Hi everyone.

I followed this howto to chroot 32 bits ubuntu distro.
https://help.ubuntu.com/community/BasicChroot
But I got a problem.
I can't copy /etc/passwd to /32bits/etc/passwd
I get this error message:

oliviern@korriban:~$ sudo grep "^[^:]*:x:[0-9][0-9][0-9][0-9]:"
/etc/passwd>> /32bits/etc/passwd
bash: /32bits/etc/passwd: Permission non accord�e
olivier@korriban:~$ ls -lha /32bits/etc/passwd
-rw-r--r-- 1 root root 761 2012-01-20 05:49 /32bits/etc/passwd

Does anyone have idea?


I have an idea that there are some actions which cannot be performed by
someone who becomes root by using the "sudo" command; one needs to
actually login as root in order to do certain things - and this password
thing may be one of them.


BC

--
It is in the nature of things that every time you try to avoid one danger you run into another.
Niccolo Machiavelli



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-20-2012, 12:46 PM
Conny Enström
 
Default Can't copy /etc/passwd

2012-01-20 14:11, Olivier Pavilla skrev:

Hi everyone.

I followed this howto to chroot 32 bits ubuntu distro.
https://help.ubuntu.com/community/BasicChroot
But I got a problem.
I can't copy /etc/passwd to /32bits/etc/passwd
I get this error message:

oliviern@korriban:~$ sudo grep "^[^:]*:x:[0-9][0-9][0-9][0-9]:"
/etc/passwd>> /32bits/etc/passwd
bash: /32bits/etc/passwd: Permission non accordée
olivier@korriban:~$ ls -lha /32bits/etc/passwd
-rw-r--r-- 1 root root 761 2012-01-20 05:49 /32bits/etc/passwd

Does anyone have idea?

--
Olivier Pavilla
http://www.linux-squad.com
"Les fautes d'orthographes de mes propos sont sous licence Ane bâté 1.0"




Install Midnight Commander ( sudo apt-get install mc ) might work.
Then: sudo mc
Try and copy the file passwd again ( F5 )


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-20-2012, 12:55 PM
Rashkae
 
Default Can't copy /etc/passwd

On 01/20/2012 08:11 AM, Olivier Pavilla wrote:

Hi everyone.

I followed this howto to chroot 32 bits ubuntu distro.
https://help.ubuntu.com/community/BasicChroot
But I got a problem.
I can't copy /etc/passwd to /32bits/etc/passwd
I get this error message:

oliviern@korriban:~$ sudo grep "^[^:]*:x:[0-9][0-9][0-9][0-9]:"
/etc/passwd>> /32bits/etc/passwd
bash: /32bits/etc/passwd: Permission non accordée
olivier@korriban:~$ ls -lha /32bits/etc/passwd
-rw-r--r-- 1 root root 761 2012-01-20 05:49 /32bits/etc/passwd

Does anyone have idea?



Your problem is sudo redirection. See here:

http://www.brandonhutchinson.com/Redirection_with_sudo.html

I'm not at all sure what dance you'll have to do to get quotes working
within quotes. Personally, I'm lazy, and would simply use sudo -s to
open a root level command prompt.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-20-2012, 01:04 PM
Olivier Pavilla
 
Default Can't copy /etc/passwd

Le 20/01/2012 14:55, Rashkae a écrit :
> On 01/20/2012 08:11 AM, Olivier Pavilla wrote:
>> Hi everyone.
>>
>> I followed this howto to chroot 32 bits ubuntu distro.
>> https://help.ubuntu.com/community/BasicChroot
>> But I got a problem.
>> I can't copy /etc/passwd to /32bits/etc/passwd
>> I get this error message:
>>
>> oliviern@korriban:~$ sudo grep "^[^:]*:x:[0-9][0-9][0-9][0-9]:"
>> /etc/passwd>> /32bits/etc/passwd
>> bash: /32bits/etc/passwd: Permission non accordée
>> olivier@korriban:~$ ls -lha /32bits/etc/passwd
>> -rw-r--r-- 1 root root 761 2012-01-20 05:49 /32bits/etc/passwd
>>
>> Does anyone have idea?
>>
>
> Your problem is sudo redirection. See here:
>
> http://www.brandonhutchinson.com/Redirection_with_sudo.html
>
> I'm not at all sure what dance you'll have to do to get quotes working
> within quotes. Personally, I'm lazy, and would simply use sudo -s to
> open a root level command prompt.
>
>

Thank you for this really interesting idea.
After I did sudo -s
It works
grep "^[^:]*:x:[0-9][0-9][0-9][0-9]:" /etc/passwd>> /32bits/etc/passwd

--
--
Olivier Pavilla
http://www.linux-squad.com
"Les fautes d'orthographes de mes propos sont sous licence Ane bâté 1.0"

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 01:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org