如何逃避 `su -arch`?
How to escape the `su -arch`?
我分配一个帐户名arch
。
useradd -m -G users arch
passwd arch
现在用命令 su -arch
.
su 进入 arch
如何使用某种转义方法 su 进入帐户名 arch
?
我认为混淆是因为您可以使用
作为 root 用户登录
su - # There are no options in this case and the default login is root
但你不应该这样做
su -arch #Anything the follows is an option
因为 a
不是一个有效的选项,你得到了一个错误
正确的方法可能是以下任何人
su arch
su - arch # mind the space
su -- arch # The -- marks the end of options, gives way for non-options arguments
您可以通过以下几种方式登录 su shell
su - arch
su -l arch
su --login arch
问题是使用以下命令处理选项 - 没有 su -a
选项
su -arch
我分配一个帐户名arch
。
useradd -m -G users arch
passwd arch
现在用命令 su -arch
.
如何使用某种转义方法 su 进入帐户名 arch
?
我认为混淆是因为您可以使用
作为 root 用户登录su - # There are no options in this case and the default login is root
但你不应该这样做
su -arch #Anything the follows is an option
因为 a
不是一个有效的选项,你得到了一个错误
正确的方法可能是以下任何人
su arch
su - arch # mind the space
su -- arch # The -- marks the end of options, gives way for non-options arguments
您可以通过以下几种方式登录 su shell
su - arch
su -l arch
su --login arch
问题是使用以下命令处理选项 - 没有 su -a
选项
su -arch