Showing posts with label System Admin. Show all posts
Showing posts with label System Admin. Show all posts

Tuesday, June 8, 2010

Create an FTP only account in Solaris

The FTP-only username is ftpuser in the following instructions.
   
1. su to root

2. # cat /etc/passwd|cut -f 1 -d: > /etc/ftpusers

3. # echo 'echo "FTP user"' > /bin/ftpuser
# chmod a+x /bin/ftpuser

4. If /etc/shell exists, add 


/bin/ftpuser 

to the last line. 

If not

# ls /bin/*sh > /etc/shells
 

Then add /bin/ftpuser to the last line

5. # useradd -c "FTP User" -d /export/home/ftpuser -m -s /bin/ftpuser -g staff ftpuser
6. # passwd ftpuser



Source: http://www.tek-tips.com/faqs.cfm?fid=2315 + my modifications.
  
Added on 6/9/2010: I just found that my full access account couldn't ftp any more after this. Only ftpuser can ftp. For some strange reason, my username got added to /etc/ftpusers which lists the users that can NOT ftp... Very very weird. After removing my username, the ftp works again.

Thursday, February 21, 2008

NTP Client Configuration on Solaris 10

NTP Client Configuration on Solaris 10

1. Check the ntp daemon
ps -ef | grep ntp

It returns xntpd is running.

2. Stop the daemon:
svcadm disable ntp

3. Copy /etc/inet/ntp.client to /etc/inet/ntp.conf. Change mode of ntp.conf to make it writable. Use vi to edit ntp.conf.

Add the following lines:

server yourcompanystimeserver prefer
server 192.43.244.18
server 129.6.15.28
server 216.200.93.8
server 64.236.96.53

multicastclient 224.0.1.1

4. Sync with the time server:
ntpdate yourcompanystimeserver

5. Start ntp daemon
svcadm enable ntp


In Windows XP,
1. download TimeTools SNTP Client from this link.
2. Open a command prompt. Type the following to stop w32time from blocking the port
u:\> net stop w32time

3. Launch TimeTools SNTP Client, in Option page, enter the NTP server IP, tick Adjust System Time and click OK to synchronize. Remember close it immediately because this tool has some bug which causes huge time error if you let it run continuously.