soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

New user no login

Tue Aug 14, 2018 11:16 pm

Want to add a user who runs pivpn but dont want user to login
How do i add this user to the pi

User avatar
DougieLawson
Posts: 35790
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: New user no login

Tue Aug 14, 2018 11:20 pm

Set the shell variable in /etc/password to /bin/false

Code: Select all

vpnonly:x:1200:1200::/home/vpnonly:/bin/false
You don't even need to create the /home/vpnonly directory.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: New user no login

Wed Aug 15, 2018 9:40 am

Thanks. I was Force to Crete the home directory because that’s were the ovpn files are stored by default. Anyone knows how to tell pivpn to use another folder?

User avatar
HawaiianPi
Posts: 4530
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: New user no login

Wed Aug 15, 2018 11:49 am

You can also disable a user with,

Code: Select all

sudo passwd --lock username
For example, after I create my own user in Raspbian, I login and disable the default "pi" user with,

Code: Select all

sudo passwd --lock pi
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “General discussion”