You are not logged in.

#1 2009-11-20 19:54:33

el_cammello
Member
From: Italy
Registered: 2009-03-20
Posts: 70
Website

[Resolved] archiso: /bin/bash permission denied

Hi
I've this problem in my live created with archiso:

su -c "command" <user archiso>

doesn't work.

I also tried to add a new user, "john", with the adduser command, but the problem remains.
I tried to login in john, and:

su john
/bin/bash: permission denied

I've check the permission of files shadow, group, and passwd and are ok.

Any ideas???

Thx

Last edited by el_cammello (2009-11-22 07:43:54)


Sorry for my bad english :-)

Offline

#2 2009-11-20 20:57:59

berkeley
Member
Registered: 2009-11-20
Posts: 2

Re: [Resolved] archiso: /bin/bash permission denied

Have you checked the permissions on /usr/su itself?  Make sure everyone has execute permissions, if you want anyone to be able to use su.

Offline

#3 2009-11-21 07:25:36

Svenstaro
Administrator
From: Germany
Registered: 2008-11-19
Posts: 388

Re: [Resolved] archiso: /bin/bash permission denied

Give us some info here. You are experiencing this within the booted live system, right? Can you use root okay? Try manually creating a user (edit passwd yourself). Check if the user is in the required groups (refer to Arch Linux Beginner's Guide). This is probably a very easy thing to solve, don't worry.

Apart from that, did you stumble upon any trouble using the archiso-git package or were you able to get a bootable system right away?

Offline

#4 2009-11-21 08:32:06

el_cammello
Member
From: Italy
Registered: 2009-03-20
Posts: 70
Website

Re: [Resolved] archiso: /bin/bash permission denied

berkeley wrote:

Have you checked the permissions on /usr/su itself?  Make sure everyone has execute permissions, if you want anyone to be able to use su.

[root@acerone /]# ls -l /media/banca_dati/Livecd/ArchOne_beta/work/root-image/bin/su 
-r-sr-xr-x 1 root root 23692 13 set 14:40 /media/banca_dati/Livecd/ArchOne_beta/work/root-image/bin/su
Svenstaro wrote:

Give us some info here. You are experiencing this within the booted live system, right? Can you use root okay? Try manually creating a user (edit passwd yourself). Check if the user is in the required groups (refer to Arch Linux Beginner's Guide). This is probably a very easy thing to solve, don't worry.

Apart from that, did you stumble upon any trouble using the archiso-git package or were you able to get a bootable system right away?

root user works perfectly, and archiso package works, the distro starts without problems.
The problem occurs at login, where I can just log into root, and not with the existing user "archone".

In /etc/rc.local, I have these commands:

[root@acerone /]# cat /media/banca_dati/Livecd/ArchOne_beta/work/overlay/etc/rc.local
 #!/bin/bash
 #
 # /etc/rc.local: Local multi-user startup script.
 #

 
 mkdir /home/archone   # WORKS
 chown archone:users /home/archone  # WORKS
 
 # persistent home function... ***UNUSED FOR NOW*** 
 cmdline=$(cat /proc/cmdline)
 for arg in $cmdline; do
     
     if [ "${arg##persistent_home=/dev/}" != "${arg}" ]; then
         device=${arg##persistent_home=/dev/}
         /bin/mkdir /media/$device
         /bin/mount /dev/$device /media/$device
         /sbin/losetup /dev/loop2 /media/$device/home_archone.img
         mount /dev/loop2 /home/archone    
     fi
 done
     
 if [ "$device" == "" ]; then
 
# DOESN'T WORK : /bin/bash permission denied
    su -c "cp -r /etc/skel/.[a-zA-Z0-9]* /home/archone/" archone   
        su -c "cp -r /etc/skel/images /home/archone/images" archone 
        su -c "cp /etc/skel/update_time.sh /home/archone/update_time.sh" archone 
        su -c "cp /etc/skel/battery_governor.sh /home/archone/battery_governor.sh" archone

at boot, those 4 lines: "su -c..." doesn't works because return the error "/bin/bash: permission denied".

cat  /media/banca_dati/Livecd/ArchOne_beta/work/overlay/etc/passwd | grep archone
archone:x:1004:100:,,,:/home/archone:/bin/bash
cat /media/banca_dati/Livecd/ArchOne_beta/work/overlay/etc/group | grep archone | cut -d":" -f 1
wheel
network
video
audio
optical
storage
power
users
dbus
hal
fuse
ls -l /media/banca_dati/Livecd/ArchOne_beta/work/root-image/bin/bash 
-rwxr-xr-x 1 root root 595336 30 ott 04:58 /media/banca_dati/Livecd/ArchOne_beta/work/root-image/bin/bash
ls -l /media/banca_dati/Livecd/ArchOne_beta/work/root-image/bin/su   
-r-sr-xr-x 1 root root 23692 13 set 14:40 /media/banca_dati/Livecd/ArchOne_beta/work/root-image/bin/su

then I tried adding a new user from root:

adduser john
     .....
     interactive questions ...
     .....
     (everything ok)
su john
     /bin/bash: permission denied

then I logout from root and I0ve try the login by user john:

archone login: john
password: john
    unable to cd /home/john

and logout.

I've check the directory:

login -> root
ls -l /home/john
     permissions, files from /etc/skel,  everything ok !!!!!!!!!!

Sorry for my bad english :-)

Offline

#5 2009-11-21 08:55:40

Svenstaro
Administrator
From: Germany
Registered: 2008-11-19
Posts: 388

Re: [Resolved] archiso: /bin/bash permission denied

You said the last four lines from rc.local aren't working but then you say that they get put there fine?

Also, you shouldn't use the user itself to copy files from skel, you should just do a normal cp -r and then chown it to the user. In my system, I do it like:
# Create user directory for live session
if [ ! -d /home/gamer ]; then
    mkdir /home/gamer && chown gamer:gamer /home/gamer
fi
su -c "cp -r /etc/skel/.[a-zA-Z0-9]* /home/gamer/" gamer

It might also be that you do not have an entry for your user in /etc/shadow. Try something like archie::12922:0:99999:7:::

Are you supplying a default rc.conf or the archiso one? If you use the archiso one, you will want to also supply the /etc/archsio directory (look up the included default configurations in /usr/share/archiso).

Offline

#6 2009-11-22 07:43:31

el_cammello
Member
From: Italy
Registered: 2009-03-20
Posts: 70
Website

Re: [Resolved] archiso: /bin/bash permission denied

and IT WORKS !!!!!!!!!!!!!!!!!!!!!  big_smile:D:D:D:D

I simply resolved in this way:

sudo chmod -R 777 /media/banca_dati/Livecd/ArchOne_beta
sudo chmod 0440 /media/banca_dati/Livecd/ArchOne_beta/overlay/etc/sudoers

and run make.

So it was a permission problem on some files

thanks for the support smile


Sorry for my bad english :-)

Offline

#7 2010-01-29 14:37:58

aceqbaceq
Member
Registered: 2010-01-29
Posts: 1

Re: [Resolved] archiso: /bin/bash permission denied

i've solved today similar problem by adjusting permissions on all folders in root folder

all  folder must be 755

and

lost+found = 770
proc = 555
root = 750
tmp =777

Offline

Board footer

Powered by FluxBB