You are not logged in.
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
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
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
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
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
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
and IT WORKS !!!!!!!!!!!!!!!!!!!!! :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
Sorry for my bad english :-)
Offline
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