You are not logged in.

#1 2010-10-12 14:54:07

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

Setting up account without a password

Hi all,

Quite dumb question - how to make an account without a password? Actually, it is needed to do some potentially unpleasant actions within "sandboxed" user, like $ su limited_user -c dangerous_thing without typing password 100500 times a day.

I googled a bit, but only found the following solution:

# useradd -d /some/safe/path -g users -m -s /bin/rsh limited_user       # or whatever parameters needed
# passwd -d limited_user

It works under Debian in VM, but not in Arch (still asked for password). So how can it be achieved here?

Offline

#2 2010-10-12 15:17:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Setting up account without a password

Edit sudoers and allow that user to execute some / all commands w/o the password.

Offline

#3 2010-10-12 15:22:58

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

Re: Setting up account without a password

Well, I got it. But isn't it strange? Basically, it should work in the way presented (as in Debian).

Offline

#4 2010-10-12 18:45:09

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: Setting up account without a password

That's why one is called Debian, and one is called Arch.   They aren't the same.   smile

Offline

#5 2010-10-12 20:23:15

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

Re: Setting up account without a password

Okay, but why? It's only because someone want to be "different"? Looks like there's some serious cause.

Again, it's strange when empty password means blocked account, while there are different (also by effect on /etc/shadow) passwd -l and passwd -d. Also using karol's method requires sudo package, which means that some utility-like way is used. At this time it's more logical to move such functionality to standart shadow package, since it doesn't deal with running commands from a different user, but with login in special conditions (without a password).

I just want to know why the things are this way.

Offline

#6 2010-10-12 21:13:45

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: Setting up account without a password

As far as the login console is concerned, passwd -d make the account passwordless. I.e. you can login from the console without being asked. That makes it even stranger that su behaves differently.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#7 2010-10-13 09:20:34

Kosmonavt
Member
Registered: 2010-02-15
Posts: 100

Re: Setting up account without a password

I checked again in pure terminal without X.  If you initially login via limited_user, password isn't really asked. But when you try to login to it from any other non-root user, then password is asked. Which isn't logical from security point of view. I guess that /bin/login may take user properties differently from su. So was Arch version pure upstream (respectively, Debian as usually invented something own)?

Offline

Board footer

Powered by FluxBB