[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unable to determine your tty name error.







On Sat, May 11, 2013 at 2:20 PM, Paul Boddie <paul@boddie.org.uk> wrote:
On Saturday 11 May 2013 10:12:39 mind entropy wrote:
> On Fri, May 10, 2013 at 2:32 AM, Paul Boddie <paul@boddie.org.uk> wrote:
> >
> > I found that even though multistrap elevates its privileges using sudo,
> > the resulting filesystem hierarchy preserves the original user's
> > permissions. Consequently, the booted system didn't like various files
> > having the wrong uid. I may have discovered this previously and had noted
> > in my own instructions that multistrap needs to be run as root or using
> > sudo (unless anyone can advise me differently), but this time I assumed
> > that when multistrap invoked sudo everything would end up being owned by
> > root.

[...]

> I am using sudo itself to archive and zip up the rootfs.
> I use -->  tar -cpjvf <filename.tar.bz2> . --numeric-owner

What does the ownership and permissions of the top level of your multistrapped
filesystem look like (along with things like /etc/shadow)? My mistake of not
running multistrap itself using sudo meant that everything was owned by my
own unprivileged user rather than root, which then caused problems on the
target system.




Permissions
------------------

My shadow file contains
root:::::::::



ls -al
total 82512
drwxr-xr-x 19 root root     4096 Jun 22  2012 .
drwxr-xr-x  3 root root     4096 May  6 21:23 ..
drwxr-xr-x  2 root root     4096 Dec 11 23:44 bin
drwxr-xr-x  2 root root     4096 Dec 14 18:40 boot
drwxr-xr-x  2 root root     4096 May  6 21:43 debootstrap
drwxr-xr-x  3 root root     4096 May  9 23:57 dev
drwxr-xr-x 30 root root     4096 Jan  1  1970 etc
drwxr-xr-x  2 root root     4096 Dec 14 18:40 home
drwxr-xr-x  7 root root     4096 Jun 22  2012 lib
drwxr-xr-x  2 root root     4096 Dec 14 18:40 mnt
drwxr-xr-x  2 root root     4096 Dec 14 18:40 proc
drwx------  2 root root     4096 Dec 14 18:40 root
-rw-r--r--  1 root root 84321063 May  8 22:54 rootfs2.tar.bz2
drwxr-xr-x  2 root root     4096 Jan  1  1970 run
drwxr-xr-x  2 root root     4096 Dec 11 23:44 sbin
drwxr-xr-x  2 root root     4096 Jun 10  2012 selinux
drwxr-xr-x  2 root root     4096 Feb  8 06:34 sys
drwxrwxrwt  2 root root     4096 Dec 14 18:40 tmp
drwxr-xr-x  9 root root     4096 Jun 22  2012 usr
drwxr-xr-x 11 root root     4096 Dec 11 23:43 var


drwxr-xr-x 30 root root  4096 Jan  1  1970 .
drwxr-xr-x 19 root root  4096 Jun 22  2012 ..
drwxr-xr-x  2 root root  4096 Mar 18 11:54 alternatives
drwxr-xr-x  3 root root  4096 May  6 21:43 apt
-rw-r--r--  1 root root  1895 Jan  1 09:01 bash.bashrc
drwxr-xr-x  2 root root  4096 Nov 24 04:29 bash_completion.d
-rw-r--r--  1 root root   356 Dec 30 23:03 bindresvport.blacklist
drwxr-xr-x  2 root root  4096 May 26  2012 cron.daily
-rw-r--r--  1 root root  2969 Dec 26 06:39 debconf.conf
-rw-r--r--  1 root root     4 Dec 12 16:30 debian_version
drwxr-xr-x  2 root root  4096 Dec 11 23:44 default
drwxr-xr-x  4 root root  4096 Mar 18 11:55 dpkg
-rw-r--r--  1 root root    80 May  9 20:24 fstab
drwxr-xr-x  2 root root  4096 Dec 11 23:44 fstab.d
-rw-r--r--  1 root root  2940 Dec 30 23:04 gai.conf
-rw-r--r--  1 root root    30 May  9 20:16 group
-rw-r--r--  1 root root     9 Aug  7  2006 host.conf
-rw-r--r--  1 root root    11 Apr  6 23:37 hostname
drwxr-xr-x  2 root root  4096 Feb  8 06:34 init
drwxr-xr-x  2 root root  4096 Dec 11 23:44 init.d
-rw-r--r--  1 root root   262 May  9 20:27 inittab
drwxr-xr-x  3 root root  4096 Nov 24 04:29 insserv
-rw-r--r--  1 root root   859 Nov 24 04:29 insserv.conf
drwxr-xr-x  2 root root  4096 Nov 24 04:29 insserv.conf.d
-rw-r--r--  1 root root    28 Dec 14 18:40 issue
-rw-r--r--  1 root root    21 Dec 14 18:40 issue.net
drwxr-xr-x  2 root root  4096 Dec 31 04:00 ld.so.conf.d
-rw-r--r--  1 root root 10185 May 26  2012 login.defs
drwxr-xr-x  2 root root  4096 Mar 18 11:55 logrotate.d
-rw-r--r--  1 root root   956 Mar 21 08:08 mke2fs.conf
-rw-r--r--  1 root root   298 Jan  1  1970 mtab
drwxr-xr-x  3 root root  4096 Oct 15  2012 network
-rw-r--r--  1 root root   256 Dec 14 18:40 os-release
-rw-r--r--  1 root root   552 Apr 29  2012 pam.conf
drwxr-xr-x  2 root root  4096 May 11 14:27 pam.d
-rw-r--r--  1 root root   113 May  9 20:11 passwd
drwxr-xr-x  2 root root  4096 Dec 14 18:40 profile.d
drwxr-xr-x  2 root root  4096 Oct 15  2012 rc0.d
drwxr-xr-x  2 root root  4096 Oct 15  2012 rc1.d
drwxr-xr-x  2 root root  4096 Feb  8 05:56 rc2.d
drwxr-xr-x  2 root root  4096 Feb  8 05:56 rc3.d
drwxr-xr-x  2 root root  4096 Feb  8 05:56 rc4.d
drwxr-xr-x  2 root root  4096 Feb  8 05:56 rc5.d
drwxr-xr-x  2 root root  4096 Oct 15  2012 rc6.d
drwxr-xr-x  2 root root  4096 Oct 15  2012 rcS.d
-rw-r--r--  1 root root   172 May  6 21:43 resolv.conf
-rwxr-xr-x  1 root root   268 Jan  2 22:05 rmt
-rw-r--r--  1 root root  3973 May  8 22:58 securetty
drwxr-xr-x  4 root root  4096 May  4  2012 security
drwxr-xr-x  2 root root  4096 Jun 10  2012 selinux
-rw-r-----  1 root root    14 May 11 14:32 shadow
drwxr-xr-x  2 root root  4096 Jan  1 09:01 skel
drwxr-xr-x  2 root root  4096 Jun 27  2012 terminfo

-Gautam

Reply to: